Skip to content

[Task]: Research & design the acceptance test harness #18

Description

@michael-duren

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
    createdrunningstopped), 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskA single, concrete unit of build worktesting

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions