In this commit, we introduce unit tests for both the `ValidationAdmission` and `MutatingAdmission` webooks specifically for the `MultiClusterService` resource. - Validation webhook tests: - Tests the behavior when decoding the request object fails, verifying that admission is denied with an appropriate error message. - Validates that the webhook denies admission when encountering invalid values in the `MultiClusterService` spec, ensuring error messaging. - Confirms that valid `MultiClusterService` objects are admitted without errors. - Mutation webhook tests: - Handles decode errors and denies admission when decoding fails. - Provides full coverage of `MultiClusterService` object mutation, including setting default namespaces and validating no unnecessary patches. Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com> |
||
---|---|---|
.. | ||
clusteroverridepolicy | ||
clusterpropagationpolicy | ||
clusterresourcebinding | ||
configuration | ||
cronfederatedhpa | ||
federatedhpa | ||
federatedresourcequota | ||
interpreter | ||
multiclusteringress | ||
multiclusterservice | ||
overridepolicy | ||
propagationpolicy | ||
resourcebinding | ||
resourcedeletionprotection | ||
resourceinterpretercustomization | ||
work |