How it works
A suite runs in phases:
- Platform setup — create Docker networks/images, LXD projects/profiles
- Node setup — start containers, connect to hosts
- Facts — gather node facts (addresses are built in)
- Setup steps — install, configure, wait for readiness
- Tests — run and evaluate
- Teardown steps, then node and platform teardown
Node and platform teardown run on every path that reaches the end of the run,
including after a failure: a deferred cleanup tears down every node that
completed setup, in declaration order, then every platform that completed
setup, in reverse, and prints [+] cleaning up after error.
Teardown steps (phase 6) are the exception — they run only when the test
phase completes. An unhandled setup step failure, a test that errors, and
--stop-on-error aborting on the first failing test all jump straight to
node and platform teardown.
Warning: --setup-only and --until with the default exit behavior stop
earlier by design and skip every teardown phase, leaving nodes and platforms
standing for inspection. --teardown-only is what removes them.
Report files follow the same boundary: everything from the test phase onward produces a report, and anything that aborts before it produces none. See Running in CI for what that means for a pipeline that publishes results.