1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/test/conformance/kuttl/exceptions/allows-rejects-creation
2023-01-09 10:52:16 +08:00
..
01-policy.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
02-exception.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
03-configmap.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
configmap-allowed.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
configmap-rejected.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
exception.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
policy-assert.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
policy.yaml test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00
README.md test: add kuttl test for policy exception (#5935) 2023-01-09 10:52:16 +08:00

Description

This test creates a policy, a policy exception and tries to create a couple configmaps. The policy exception is configured to apply only to the emergency configmap. The emergency configmap is expected to create fine while other configmaps creations should fail.

Steps

    • Create a cluster policy
    • Assert the policy becomes ready
    • Create a policy exception for the cluster policy created above, configured to apply to configmap named emergency
    • Try to create a confimap named emergency, expecting the creation to succeed
    • Try to create a confimap named foo, expecting the creation to fail