mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 21:27:14 +01:00
README documented `bats tests/test_vmbox.bats` covering "name validation, meta handling, serial rotation and the full verdict table", and the handoff made it a done-condition, but the file did not exist. Written to that spec: 39 tests, no VM boot, well under a second. VMBOX_HOME is redirected to a per-test mktemp dir, so the suite can create and delete VM state without any chance of clobbering a live sandbox's overlay or pidfile; one test asserts every path helper stays inside it. The verdict cases encode the distinctions the design turns on rather than just exercising the function: guest:true with a truncated serial log is DIRTY (3) and not a clean poweroff, POWERDOWN alone proves nothing and must read as "none", an unrecognised shutdown reason fails closed at 6 rather than passing silently, and events.jsonl is read last-event-first so a previous boot's poweroff is never mistaken for this run's outcome. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdyMBGCrGVGDWtJ9xe48f3 |
||
|---|---|---|
| .. | ||
| destructive_demo.sh | ||
| shutdown_verdict_demo.sh | ||
| test_vmbox.bats | ||