Skip to content

Lint tests

Overview

Chainsaw comes with a lint command to detect ill-formated tests.

Reference documentation

You can view the full command documentation here.

Usage

To build the docs of a test, Chainsaw provides the chainsaw lint test -f path/to/chainsaw-test.yaml command.

chainsaw lint test -f - <<EOF
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: assertion-tree
spec:
  steps:
  - try:
    - assert:
        file: assert.yaml
EOF
Processing input...
The document is valid