1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-23 00:01:55 +00:00
kyverno/test/conformance/chainsaw/imageverificationpolicies/match-conditions/chainsaw-test.yaml

30 lines
815 B
YAML
Raw Normal View History

# 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: audit
spec:
steps:
- name: create policy
try:
- create:
file: policy.yaml
- assert:
file: policy-assert.yaml
- name: create bad pod
try:
- create:
file: bad-pod.yaml
expect:
- check:
($error): >-
admission webhook "ivpol.validate.kyverno.svc-ignore-finegrained-ivpol-sample" denied the request: Policy ivpol-sample failed: failed to verify image with notary cert
- name: create good pod
try:
- create:
file: good-pod.yaml
- sleep:
duration: 10s
- assert:
file: good-pod.yaml