mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
30 lines
615 B
YAML
Executable file
30 lines
615 B
YAML
Executable file
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: allows-rejects-creation
|
|
spec:
|
|
steps:
|
|
- name: step-01
|
|
try:
|
|
- apply:
|
|
file: policy.yaml
|
|
- assert:
|
|
file: policy-assert.yaml
|
|
- name: step-02
|
|
try:
|
|
- apply:
|
|
file: exception.yaml
|
|
- name: step-03
|
|
try:
|
|
- apply:
|
|
file: configmap-allowed.yaml
|
|
- apply:
|
|
expect:
|
|
- check:
|
|
($error != null): true
|
|
file: configmap-rejected.yaml
|
|
- assert:
|
|
file: configmap-allowed.yaml
|
|
- error:
|
|
file: configmap-rejected.yaml
|