Skip to content

How it works

A suite runs in phases:

  1. Platform setup — create Docker networks/images, LXD projects/profiles
  2. Node setup — start containers, connect to hosts
  3. Facts — gather node facts (addresses are built in)
  4. Setup steps — install, configure, wait for readiness
  5. Tests — run and evaluate
  6. 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.