What needs to be done
Decide and document how we drive box end-to-end in acceptance tests, so the
implementation tasks have a settled design to build against. The output is a
short design note in the repo (e.g. docs/acceptance-testing.md) plus answers to
the epic's open questions.
Cover:
- Privilege model. Determine whether the suite targets root (
sudo) or
rootless (user namespaces + newuidmap/subuid). The current sample
config.json has no user namespace, so document what's required today and what
rootless would need.
- How to invoke the runtime. We drive the real CLI:
box create <id> --bundle <dir>, box start <id>, box state <id>, box kill <id>, box delete <id>. Decide whether tests shell out to the built ./bin/box (build it
first) or call internal/operations directly. Prefer driving the binary so the
test mirrors real usage.
- Test framework. Go acceptance tests behind a
//go:build acceptance tag
vs. a bats/shell suite. Note how state directories ($XDG_STATE_HOME, etc.)
are isolated per test so runs don't collide or touch a developer's real state.
- What to assert. OCI status transitions via
box state (creating →
created → running → stopped), exit codes, the user process actually
running, and that delete removes the state + runtime dirs.
- Skip strategy. How the suite detects missing prerequisites (not Linux, no
privileges, no rootfs) and skips with a clear reason instead of failing.
Acceptance criteria
Parent / tracking issue
Part of #17.
Rough size
M — a day or two
What needs to be done
Decide and document how we drive
boxend-to-end in acceptance tests, so theimplementation tasks have a settled design to build against. The output is a
short design note in the repo (e.g.
docs/acceptance-testing.md) plus answers tothe epic's open questions.
Cover:
sudo) orrootless (user namespaces +
newuidmap/subuid). The current sampleconfig.jsonhas no user namespace, so document what's required today and whatrootless would need.
box create <id> --bundle <dir>,box start <id>,box state <id>,box kill <id>,box delete <id>. Decide whether tests shell out to the built./bin/box(build itfirst) or call
internal/operationsdirectly. Prefer driving the binary so thetest mirrors real usage.
//go:build acceptancetagvs. a bats/shell suite. Note how state directories (
$XDG_STATE_HOME, etc.)are isolated per test so runs don't collide or touch a developer's real state.
box state(creating→created→running→stopped), exit codes, the user process actuallyrunning, and that
deleteremoves the state + runtime dirs.privileges, no rootfs) and skips with a clear reason instead of failing.
Acceptance criteria
//go:build acceptance) vs. bats, with rationaleParent / tracking issue
Part of #17.
Rough size
M — a day or two