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 67bdcd6 commit df5f2de
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 @@ -53,3 +53,11 @@ repos:
- id: no-commit-to-branch
- id: trailing-whitespace
exclude: ^vendor

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

Please sign in to comment.