Commit Graph

1 Commits

Author SHA1 Message Date
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