1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/conformance/kuttl/policy-validation/cluster-policy/policy-exceptions-disabled
Ved Ratan 942814e942
[Feature] Add kuttl tests with policy exceptions disabled (#7117)
* added tests

Signed-off-by: Ved Ratan <vedratan8@gmail.com>

* removed redundant code

Signed-off-by: Ved Ratan <vedratan8@gmail.com>

* fix

Signed-off-by: Ved Ratan <vedratan8@gmail.com>

* fix

Signed-off-by: Ved Ratan <vedratan8@gmail.com>

* typo fix and README changes

Signed-off-by: Ved Ratan <vedratan8@gmail.com>

* fix

Signed-off-by: Ved Ratan <vedratan8@gmail.com>

---------

Signed-off-by: Ved Ratan <vedratan8@gmail.com>
2023-05-07 18:09:21 -04:00
..
00-policy.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
01-policy_exception.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
02-resource.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
policy-assert.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
policy.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
policy_exception.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
README.md [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00
resource.yaml [Feature] Add kuttl tests with policy exceptions disabled (#7117) 2023-05-07 18:09:21 -04:00

Description

This test is attempting to create a resource with the label "app: my-test-app", which would typically violate the policy defined. However, there is a policy exception defined for resources with the same label, which should bypass the policy. Since the Policy Exception feature has not been enabled, the resource will be blocked by the policy instead of being allowed.

Expected Behavior

The Pod should be blocked.