1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/test/conformance/chainsaw/events/policy/policy-violation/chainsaw-test.yaml

32 lines
663 B
YAML
Raw Normal View History

apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: policy-violation
spec:
steps:
- name: create policy
use:
template: ../../../_step-templates/create-policy.yaml
with:
bindings:
- name: file
value: policy.yaml
- name: wait policy ready
use:
template: ../../../_step-templates/policy-ready.yaml
with:
bindings:
- name: name
value: require-labels
- name: step-02
try:
- apply:
expect:
- check:
($error != null): true
file: resource.yaml
- name: step-03
try:
- assert:
file: event-assert.yaml