karmada/pkg/webhook/resourcebinding
Mohamed Awnallah e689eafd3f pkg: test ResourceBinding mutating webhook
In this commit, we introduce unit tests for the `MutatingAdmission`
webhook that mutates the `ResourceBinding` resource. These tests ensure
correct behavior for various mutation scenarios and improve coverage:

- Testing the handling of decode errors and ensuring that admission
is denied when decoding fails.
- Full coverage testing of policy mutation, including setting default
UUID labels for the `ResourceBinding`.
- Verifying that only the expected patch for the UUID label is applied,
ensuring no other unnecessary mutations.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:21:05 +03:00
..
mutating.go Adopt controller-runtime braking changes: generics support PR2783 2024-07-13 16:49:01 +08:00
mutating_test.go pkg: test ResourceBinding mutating webhook 2024-09-13 10:21:05 +03:00