karmada/pkg/webhook/multiclusteringress
Mohamed Awnallah d2259d52a1 pkg/webhook: test Multi-Cluster Ingress
In this commit we introduce unit tests for the `Validation Admission`. These
tests ensure correct behavior for various validation scenarios and improve coverage:

- 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
  `MultiClusterIngress` spec, ensuring error messaging.
- Confirms that valid `MultiClusterIngress` objects are admitted without errors.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-14 13:13:49 +03:00
..
validating.go Adopt controller-runtime braking changes: generics support PR2783 2024-07-13 16:49:01 +08:00
validating_test.go pkg/webhook: test Multi-Cluster Ingress 2024-09-14 13:13:49 +03:00