test: tie group evidence to passing tests and baseline restart on the as-built server (#36)
- tools/groups.mjs evidence entries now name the exact test, a minimum assertion count and the calls its body must keep; groups.test.mjs checks all three. - tools/evidence.mjs parses the spec reporter log and fails the gate unless every registered evidence test ran and passed; test.sh runs it after the Node suite. - restart.test.mjs snapshots the live as-built world on the first server, then compares it to the post-SIGTERM/SIGKILL state (players connect before the GM, so the GM's derived encountered grey is computed on both sides). - Negative controls: a hollowed auth test fails the new evidence check; a planted first-load drop of a token's gm prop bucket fails the new restart baseline while the old restart-to-restart test passed. - Refresh the gate evidence (control + 73 mutations incl. s1-s7, 142 node tests).
This commit is contained in:
+5
-2
@@ -11,7 +11,10 @@ fi
|
||||
cat results/nimble-test.log
|
||||
# One file at a time: every harness builds and runs the same real binary (run/test/server) and
|
||||
# starts real servers; serialising removes build/write races. Ports and state dirs are isolated.
|
||||
node --test --test-concurrency=1 tools/*.test.mjs > results/node-test.log 2>&1
|
||||
node --test --test-concurrency=1 --test-reporter=spec tools/*.test.mjs > results/node-test.log 2>&1
|
||||
rc=$?
|
||||
cat results/node-test.log
|
||||
exit $rc
|
||||
[ $rc -eq 0 ] || exit $rc
|
||||
# #36: the group map's evidence is only proof if the named tests actually ran and passed. This is a
|
||||
# separate post-run step because groups.test.mjs runs inside the suite it would have to inspect.
|
||||
node tools/evidence.mjs results/node-test.log || exit 1
|
||||
|
||||
Reference in New Issue
Block a user