You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a9e39c9
Browse filesBrowse the repository at this point in the historyBrowse files
test(e2e): clean up the resolver suite without EXIT traps
hack/bats-no-exit-trap.bats, added to main after this branch opened, is
red on this file: eleven tests install `trap 'rm -rf "$tmp"' EXIT` and
the file declares no debt, so `bats-unit-tests` fails, which skips
`finalize` and with it both the required `E2E Tests` check and this PR's
own lane.
Convert rather than declare the debt. A handler installed inside an
@test replaces the one the bats binary keeps for its own bookkeeping,
and a test that then fails prints no TAP line at all — not `not ok`,
nothing — so the suite reads green while a case is failing. Removing the
scratch directory as the last statement of the body is the documented
alternative: both runners set -e, so on failure the removal is
unreachable and the directory survives for inspection, which is what a
failed test wants anyway.
The file header now says so, next to the cleanup it explains, so the
next person adding a test here copies the right shape.
Verified: hack/bats-no-exit-trap.bats green, and all eleven cases in
this suite still pass.
Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>
0 commit comments