What needs to be done
Acceptance tests need an OCI bundle to run: a directory containing a
config.json and a rootfs/ with at least a shell/sleep binary. Provide a
reusable helper that materializes a bundle in a temp dir so each test gets an
isolated, throwaway container to drive.
The helper should:
- Produce a minimal
rootfs/ containing a static binary the tests can run
(e.g. a statically-linked busybox or a tiny Go sleep built static), so the
container has something to exec without depending on host libraries.
- Generate a
config.json based on the runtime spec we already use in unit tests
(see internal/container/testdata_test.go), with process.args pointing at
that binary, and the namespaces the runtime expects.
- Allow per-test overrides (the process args, hostname, readonly root, etc.).
- Clean itself up (temp dir +
t.Cleanup, or an equivalent for a shell suite).
Decide the rootfs source per #18 (vendor a
small tarball vs. build static binary at test time vs. fetch). Record the choice.
Acceptance criteria
Parent / tracking issue
Part of #17.
Blocked by
Rough size
M — a day or two
What needs to be done
Acceptance tests need an OCI bundle to run: a directory containing a
config.jsonand arootfs/with at least a shell/sleepbinary. Provide areusable helper that materializes a bundle in a temp dir so each test gets an
isolated, throwaway container to drive.
The helper should:
rootfs/containing a static binary the tests can run(e.g. a statically-linked
busyboxor a tiny Gosleepbuilt static), so thecontainer has something to
execwithout depending on host libraries.config.jsonbased on the runtime spec we already use in unit tests(see
internal/container/testdata_test.go), withprocess.argspointing atthat binary, and the namespaces the runtime expects.
t.Cleanup, or an equivalent for a shell suite).Decide the rootfs source per #18 (vendor a
small tarball vs. build static binary at test time vs. fetch). Record the choice.
Acceptance criteria
config.json+rootfs/) to a temp dirconfig.jsonis derived from the shared test spec and supports per-test overridesParent / tracking issue
Part of #17.
Blocked by
Rough size
M — a day or two