Skip to content

Commit b61ad29

Browse files
committed
fix(e2e): point the selector's suite rule back at the allowlist rule
The first commit says the two rules are cross-referenced so they move together, but only lg_suite_has_test pointed at the selector. The selector's suite enumeration comment now names lg_suite_has_test as well, so a change to either side prompts the other. The layout case also pins a chainsaw-test.yml that is a directory, the other half of the type test: dropping that name from the find now turns the case red. Signed-off-by: Marian Koreniuk <[email protected]> Assisted-by: LLM
1 parent cd983d4 commit b61ad29

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎hack/chainsaw-leak-guard_test.bats‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,16 +439,16 @@ baseline_of_platform() {
439439
# Chainsaw finds a Test: chainsaw-test.yaml, chainsaw-test.yml, numbered step
440440
# files, or a Test nested in a subdirectory. The allowlist has to accept the
441441
# same set, or a suite that runs cannot be exempted and the run stops before
442-
# the first suite. That includes a chainsaw-test.yaml that is a directory:
442+
# the first suite. That includes a chainsaw-test.y*ml that is a directory:
443443
# the selector keeps it so Chainsaw fails on it loudly, and refusing it here
444444
# would stop the run before Chainsaw could report it.
445445
new_fixture
446-
mkdir -p "$FIX/root/plain" "$FIX/root/yml" "$FIX/root/steps" "$FIX/root/nested/sub" "$FIX/root/dirtest/chainsaw-test.yaml"
446+
mkdir -p "$FIX/root/plain" "$FIX/root/yml" "$FIX/root/steps" "$FIX/root/nested/sub" "$FIX/root/dirtest/chainsaw-test.yaml" "$FIX/root/dirtestyml/chainsaw-test.yml"
447447
: >"$FIX/root/plain/chainsaw-test.yaml"
448448
: >"$FIX/root/yml/chainsaw-test.yml"
449449
: >"$FIX/root/steps/01-install.yaml"
450450
: >"$FIX/root/nested/sub/chainsaw-test.yaml"
451-
printf 'plain cozystack/cozystack#1\nyml cozystack/cozystack#1\nsteps cozystack/cozystack#1\nnested cozystack/cozystack#1\ndirtest cozystack/cozystack#1\n' >"$FIX/allow"
451+
printf 'plain cozystack/cozystack#1\nyml cozystack/cozystack#1\nsteps cozystack/cozystack#1\nnested cozystack/cozystack#1\ndirtest cozystack/cozystack#1\ndirtestyml cozystack/cozystack#1\n' >"$FIX/allow"
452452
lg lg_allowlist_validate "$FIX/allow" "$FIX/root"
453453
rm -rf "$FIX"
454454
}

‎hack/select-e2e.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ inert_config_pattern='^(examples/|\.github/|\.claude/|\.gemini/|img/|hack/testda
178178
# and `-type f` would be too narrow. A chainsaw-test.y*ml counts whatever its
179179
# type: Chainsaw stats it and fails loudly on a directory, and leaving that
180180
# suite out would hide the failure instead.
181+
# The leak guard's allowlist accepts a suite by the same rule, in
182+
# lg_suite_has_test (hack/e2e-chainsaw/_lib/leak-guard.sh). Change both together.
181183
#
182184
# Captured before the sed/sort rather than piped straight into them: a pipeline
183185
# carries its LAST command's status, so `$(find ... | sed | sort)` would report

0 commit comments

Comments
 (0)