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 13, 2024
1 parent 515adcc commit bd6df68
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 @@ -70,3 +70,11 @@ repos:
hooks:
- id: bashate
entry: bashate --error . --ignore=E006,E040,E011,E020,E012

- 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 bd6df68

Please sign in to comment.