What is a test step¶
A test step is made of three main components used to determine the actions Chainsaw will perform when executing the step.
Reference documentation
The full structure of the TestStep is documented here.
Test step lifecycle¶
Test step lifecycle
- The step starts executing operations in the
trystatement - If an operation fails in the
trystatement- If a
catchstatement is present, all operations and collectors are executed
- If a
- If a
finallystatement is present, all operations and collectors are executed
Example¶
Example
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: example
spec:
steps:
- try:
- apply:
file: path/to/apply.yaml
- assert:
file: path/to/assert.yaml
catch: []
finally: []