mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 09:56:55 +00:00
12 lines
379 B
YAML
12 lines
379 B
YAML
|
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
|