# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
  name: validate-analysisdefinition
spec:
  steps:
    - name: step-00
      try:
        - apply:
            file: analysisdef_good_empty_fail.yaml
        - apply:
            file: analysisdef_good.yaml
        - apply:
            file: analysisdef_bad.yaml
            expect:
              - check:
                  ($error != null): true
    - name: step-01
      try:
        - error:
            file: analysisdef_bad.yaml
        - assert:
            file: analysisdef_good_empty_fail.yaml
        - assert:
            file: analysisdef_good.yaml
