1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 01:46:55 +00:00
kyverno/test/conformance/kuttl/validate/e2e/lowercase-kind-crd/02-script.yaml

13 lines
352 B
YAML
Raw Normal View History

apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
if kubectl apply -f resource.yaml 2>&1 | grep -q 'validation error: The label app=foo is required'
then
echo "Test succeeded. Resource creation was blocked."
exit 0
else
echo "Tested failed. Resource was created."
exit 1
fi