What needs to be done
Implement the first end-to-end acceptance test that drives the real box binary
through the full lifecycle against a real bundle, asserting the behavior our unit
tests deliberately can't reach.
Using the harness (#18) and bundle fixture
(#19), the test should:
- Build (or locate)
./bin/box and a fresh bundle running a long-lived process
(e.g. sleep).
box create <id> --bundle <dir> → assert box state <id> reports created
(this exercises the Init ↔ Reexec unix-socket handshake).
box start <id> → assert status running and that the user process is
actually alive (covers the start handshake + syscall.Exec).
box kill <id> (e.g. SIGTERM/SIGKILL) → assert status stopped and the
process is gone (covers real signal delivery).
box delete <id> → assert the state and runtime directories are removed and
box state <id> now errors (covers process kill + cleanup).
Also add the obvious negative cases that are only meaningful end-to-end, e.g.
start on an unknown id, delete of a running container without --force.
This is where the methods marked TODO(tdd) / skipped in
internal/container/container_test.go (Init, Reexec, and the happy paths of
Start/Kill/Delete) get their coverage.
Acceptance criteria
Parent / tracking issue
Part of #17.
Blocked by
Rough size
L — a few days
What needs to be done
Implement the first end-to-end acceptance test that drives the real
boxbinarythrough the full lifecycle against a real bundle, asserting the behavior our unit
tests deliberately can't reach.
Using the harness (#18) and bundle fixture
(#19), the test should:
./bin/boxand a fresh bundle running a long-lived process(e.g.
sleep).box create <id> --bundle <dir>→ assertbox state <id>reportscreated(this exercises the
Init↔Reexecunix-socket handshake).box start <id>→ assert statusrunningand that the user process isactually alive (covers the start handshake +
syscall.Exec).box kill <id>(e.g. SIGTERM/SIGKILL) → assert statusstoppedand theprocess is gone (covers real signal delivery).
box delete <id>→ assert the state and runtime directories are removed andbox state <id>now errors (covers process kill + cleanup).Also add the obvious negative cases that are only meaningful end-to-end, e.g.
starton an unknown id,deleteof arunningcontainer without--force.This is where the methods marked
TODO(tdd)/ skipped ininternal/container/container_test.go(Init,Reexec, and the happy paths ofStart/Kill/Delete) get their coverage.Acceptance criteria
create → start → state → kill → deleteagainst the real binarycreated→running→stopped)startand gone afterkilldeleteis verified to remove state + runtime filesParent / tracking issue
Part of #17.
Blocked by
Rough size
L — a few days