Skip to content

Commit f5e5181

Browse files
committed
[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 62af3d8 commit f5e5181

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎.pre-commit-config.yaml‎

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

0 commit comments

Comments
 (0)