Skip to content

Commit 46d9c59

Browse files
gibizeromersch381
authored andcommitted
[pre-commit][kuttl]Check for multiple TestAsserts
Add a new pre-commit check to avoid using more than one TestAssert in a single kuttl assert file as that can lead to false positives as only the last TestAssert is run by kuttl. Fortunately there was no such issue in this repo.
1 parent fa08997 commit 46d9c59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,11 @@ repos:
6161
hooks:
6262
- id: golangci-lint-full
6363
args: ["-v"]
64+
65+
- repo: https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci
66+
# NOTE(gibi): we cannot automatically track main here
67+
# see https://pre-commit.com/#using-the-latest-version-for-a-repository
68+
rev: e30d72fcbced0ab8a7b6d23be1dee129e2a7b849
69+
hooks:
70+
- id: kuttl-single-test-assert
71+
args: ["tests/kuttl"]

0 commit comments

Comments
 (0)