Setup / Teardown
Define phase execution stages for initialization and cleanup.
You can organize phases into setup, main, and teardown stages. Setup runs first and must complete successfully. Main runs after setup passes. Teardown always runs at the end, even if earlier phases fail.
Setup
You can add a setup section and register phases like in main.
setup:
- name: Setup Phase 1
- name: Setup Phase 2
main:
- name: Main PhaseTofuPilot runs main only if all setup phases pass, otherwise stops the test.
Teardown
You can add a teardown section and register phases like in main.
main:
- name: Main Phase
teardown:
- name: Teardown Phase 1
- name: Teardown Phase 2TofuPilot always runs teardown phases, even if setup or main phases fail.
Full Example
You can use setup, main, and teardown phases in the same procedure:
name: Full Procedure
version: 1.0.0
setup:
- name: Setup Phase 1
- name: Setup Phase 2
main:
- name: Main Phase
teardown:
- name: Teardown Phase 1
- name: Teardown Phase 2How is this guide?