1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/test/conformance/kuttl/flags/standard/emit-events/05-script.yaml

12 lines
379 B
YAML
Raw Normal View History

apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
if kubectl logs deployment/kyverno-admission-controller -n kyverno | grep "reason=\"PolicyViolation\""
then
echo "Test succeeded. PolicyViolation event was not created."
exit 0
else
echo "Tested failed. PolicyViolation event should have been created."
exit 1
fi