Skip to content

Commit 06817c1

Browse files
chore(tests): remove the two dead monitoring OIDC bats suites
`hack/e2e-apps/monitoring-oidc-system.bats` and `hack/e2e-apps/monitoring-oidc-customconfig.bats` are executed by nothing. `BATS_UNIT_FILES` is built from `$(filter-out hack/e2e-%.bats,$(wildcard hack/*.bats))`, which is neither recursive nor inclusive of e2e names; `hack/select-e2e.sh` matches `hack/[^/]+\.bats$` only; and `packages/core/testing/Makefile` names three bats files one by one, none of them these. `hack/e2e-chainsaw/README.md` records why: that directory replaced the per-app BATS suite, and these two were left behind when the old one stopped being wired up. Both read as live coverage — their headers say "What is exercised here on a live cluster" — so anyone grepping for monitoring OIDC coverage finds them and concludes it exists. It does not: `hack/e2e-chainsaw/` has no monitoring OIDC equivalent, and no run can check what these two assert. They also each call `skip`, which `hack/cozytest.sh` does not implement (cozystack#3827), so the branch written to tolerate absent Keycloak CRDs is the one that would break on them, at exit 127. Deleting them takes the decision cozystack#3638 and cozystack#3786 asked for. The Chainsaw port stays wanted and is tracked in cozystack#4051. The four comments that asserted what the directory currently holds are reworded to speak of a suite placed there instead. The `hack/e2e-apps/*` arm in `select-e2e.sh`, the capture gate in `cozytest.sh` and the recursive audit in `bats-no-exit-trap.bats` stay exactly as they are, deliberately: a suite landing there later must still be selected, captured and audited. Closes cozystack#3638 Closes cozystack#3786 Signed-off-by: Mattia Eleuteri <[email protected]> Assisted-By: Claude <[email protected]>
1 parent 356a377 commit 06817c1

6 files changed

Lines changed: 12 additions & 443 deletions

File tree

‎hack/bats-no-exit-trap.bats‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,9 @@ bnet_add_two_handlers_on_one_line() {
571571
}
572572

573573
@test "a bats file in a subdirectory is audited too" {
574-
# The ban is on every bats file under hack/, and hack/e2e-apps/ already holds
575-
# two. A flat glob would leave the claim about "every file added later" false
576-
# for anything a directory down.
574+
# The ban is on every bats file under hack/, subdirectories included. A flat
575+
# glob would leave the claim about "every file added later" false for anything
576+
# a directory down.
577577
tmp=$(mktemp -d)
578578
bnet_new_fixture "$tmp"
579579
bnet_add_nested_fixture "$tmp"

‎hack/cozytest-capture-gate.bats‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@ run_fixture() {
175175
}
176176

177177
@test "a live cluster suite under an e2e directory keeps its captures" {
178-
# hack/e2e-apps/ holds suites whose own filenames carry no prefix. Matching
179-
# the basename alone disarms them, which takes the captures away from a suite
180-
# that runs against a real cluster and therefore has state worth capturing.
178+
# A live-cluster suite under hack/e2e-apps/ carries no prefix on its own
179+
# filename. Matching the basename alone disarms it, which takes the captures
180+
# away from a suite that runs against a real cluster and therefore has state
181+
# worth capturing.
181182
dir=$(make_fixture_dir e2e-apps/plain-named-suite.bats)
182183
run_fixture "$dir" e2e-apps/plain-named-suite.bats
183184
grep -qF "$DATAPLANE_MARKER" "$dir/out"

‎hack/cozytest.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ COZY_REPORT_DIR="${COZY_REPORT_DIR:-_out/cozyreport}"
160160
# suite is precisely one `make unit-tests` refuses to run and
161161
# packages/core/testing/Makefile runs against a live cluster instead.
162162
#
163-
# That wildcard is not recursive, so it says nothing about subdirectories, and
164-
# hack/e2e-apps/ holds live-cluster suites whose own filenames carry no prefix.
163+
# That wildcard is not recursive, so it says nothing about subdirectories, and a
164+
# live-cluster suite under hack/e2e-apps/ carries no prefix on its own filename.
165165
# Matching the directory too keeps them armed; matching only the basename would
166166
# take the captures away from suites that need them, which is the opposite of
167167
# the fix. Neither test is a claim that every future live-cluster suite will be

‎hack/e2e-apps/monitoring-oidc-customconfig.bats‎

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)