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 6cfeadd
Browse filesBrowse the repository at this point in the historyBrowse files
test(hack): clean up the Talos diagnostics tests without an EXIT trap
Eight of the ten tests in this file removed their scratch directory from
a `trap ... EXIT`. Such a trap replaces the one the bats binary installs
for its own bookkeeping, so a test that fails prints no TAP line at all:
not `not ok`, nothing. The run ends with a warning that it executed nine
of ten tests, and anyone reading the tail of the output, or grepping it
for `not ok`, sees a suite with no failures in it.
Break one assertion in this file and the difference is the whole point.
Before: `1..10` followed by `# bats warning: Executed 9 instead of
expected 10 tests`, with no line naming the test that failed. After:
`not ok 2 reader Certificate is short-lived and never embeds credential
data`.
Remove the directory at the end of each body instead. 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 one test
that runs the orchestrator from inside its scratch directory returns to
where it started first -- not because rm would refuse, since BSD,
busybox and GNU rm all remove a directory from inside it and return 0,
but because the runner's own bookkeeping still runs in that subshell
after the body returns, and would be doing so on an unlinked cwd.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
assert_file_contains 'default VMI interface has no reported IP address'"$COZY_REPORT_DIR/snapshots/$COZY_SNAPSHOT_NAME/tenant-talos/worker-a/capture-error.log"
193
200
assert_file_contains 'default VMI interface has no reported IP address'"$COZY_REPORT_DIR/snapshots/$COZY_SNAPSHOT_NAME/tenant-talos/worker-b/capture-error.log"
194
201
assert_file_contains 'no tenant worker VMI has a reported IP for Talos diagnostics'"$COZY_REPORT_DIR/snapshots/$COZY_SNAPSHOT_NAME/tenant-talos/setup-error.log"
202
+
rm -rf "$tmp"
195
203
}
196
204
197
205
@test "node capture uses the VMI IP for endpoint and node with bounded commands" {
0 commit comments