Skip to content

Commit 0e4d6a3

Browse files
yankawailexfrei
authored andcommitted
test(cluster-api): declare the subshell EXIT traps in the CAPK bats suite
hack/bats-no-exit-trap.bats is an exact ratchet, and the new suite installs three traps inside explicit subshells without declaring them, so make unit-tests fails on the merge commit. The header now declares the count and says why the three are not debt. Assisted-by: LLM Signed-off-by: Yan Bondarenko <[email protected]>
1 parent c85f350 commit 0e4d6a3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎hack/capk-provider_test.bats‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/usr/bin/env bats
2+
# EXIT-TRAP DEBT: 3 -- see hack/bats-no-exit-trap.bats.
3+
# None of the three is debt: each trap sits inside an explicit subshell and
4+
# removes that test's own temp dir, so it does not displace the handler the
5+
# bats binary installs and a failure still prints its `not ok`. The count is
6+
# declared because the ratchet is exact in both directions: it fails if a
7+
# test-level trap is added here, and it fails if one of these is removed.
28

39
_capk_fixture() {
410
mkdir -p "$1/packages/system" "$1/hack" "$1/bin" "$1/oci"

0 commit comments

Comments
 (0)