1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 07:57:07 +00:00
kyverno/test/conformance/chainsaw/flags/standard/emit-events
Charles-Edouard Brétéché 426525be37
chore: fix chainsaw tests cleanup timeout (#9028)
* chore: fix chainsaw tests cleanup timeout

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* bump chainsaw

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* grace

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* checks

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* bump chainsaw

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix deletes

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix exceptions

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-11-28 06:32:32 +05:30
..
01-admission-controller-apply.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
02-policy.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
03-resource.yaml chore: fix chainsaw tests cleanup timeout (#9028) 2023-11-28 06:32:32 +05:30
04-event.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
05-script.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
admission-controller-assert.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
admission-controller.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
event-assert.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
policy-assert.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
policy.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
README.md chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
resource-fail.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00
resource.yaml chore: all chainsaw tests (#9011) 2023-11-24 11:17:58 +01:00

Description

This test updates the deployment with flag --omit-events=PolicyApplied set Then it creates a policy, and a resource. The resource is expected to be accepted. A PolicyApplied event should be created. Then it creates a respource that is expected to be rejected A PolicyViolation event should not be emitted as the flag does not include that.

Steps

  1. Update the deployment of admission controller to add this ar--omit-events=PolicyApplied.
    • Create a policy
    • Assert the policy becomes ready
    • Create a resource,
    • Asset a PolicyApplied event is created
  2. Try creating a resource with a script that is expected to fail.
  3. Exit the script with 0 if it returns an error