Skip to content

Commit

Permalink
[pre-commit][kuttl]Check for multiple TestAsserts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gibizer committed May 10, 2024
1 parent 7e1e3b1 commit 55c58c8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ repos:
hooks:
- id: golangci-lint-full
args: ["-v"]

- repo: https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci
# NOTE(gibi): we cannot automatically track main here
# see https://pre-commit.com/#using-the-latest-version-for-a-repository
rev: e30d72fcbced0ab8a7b6d23be1dee129e2a7b849
hooks:
- id: kuttl-single-test-assert
args: ["tests/kuttl"]

0 comments on commit 55c58c8

Please sign in to comment.