1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-20 14:44:50 +00:00
kyverno/test/conformance/chainsaw/flags/standard/emit-events/05-script.yaml

15 lines
492 B
YAML
Raw Normal View History

---
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: TestStep
metadata:
creationTimestamp: null
name: script
spec:
timeouts: {}
try:
- script:
content: "if kubectl logs deployment/kyverno-admission-controller -n kyverno
| grep \"reason=\\\"PolicyViolation\\\"\" \nthen \n echo \"Test succeeded.
PolicyViolation event was not created.\"\n exit 0\nelse \n echo \"Tested
failed. PolicyViolation event should have been created.\"\n exit 1\nfi\n"