In this commit, we add unit tests for the `ValidationAdmission` webhook specifically for the `ClusterOverridePolicy` resource. These tests ensure that the webhook correctly handles various admission scenarios: - Tests the behavior when decoding the request object fails, verifying that the admission is denied with an approriate error message. - Validates that the webhook denies admission when encountering invalid label values in the `ClusterOverridePolicy` spec, ensuring proper error messaging. - Confirms that valid `ClusterOverridePolicy` objects are admissionly allowed without errors. Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com> |
||
---|---|---|
.. | ||
validating.go | ||
validating_test.go |