karmada/pkg/webhook/resourceinterpretercustomiz...
Mohamed Awnallah 466634ac3d pkg/webhook: test ResourceInterpreterCustomization
In this commit, we introduce unit tests for `ValidationAdmission`
webhook for the `ResourceInterpreterCustomization` resource. The
tests include:

- Tests how the webhook responds when decoding the request object fails.
- Tests how the webhook responds when it fails to retrieve list of objects from a namespace.
- Ensures that invalid `ResourceInterpreterCustomization` spec denies the admission.
- Confirms that valid `ResourceInterpreterCustomization` spec are allowed through without errors.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-16 16:17:13 +03:00
..
helper.go feat: add license and verify license for code file 2023-11-16 11:11:21 +08:00
helper_test.go fix demo for dependencyInterpretation 2024-06-04 11:50:30 +08:00
validating.go Adopt controller-runtime braking changes: generics support PR2783 2024-07-13 16:49:01 +08:00
validation_test.go pkg/webhook: test ResourceInterpreterCustomization 2024-09-16 16:17:13 +03:00