karmada/pkg/webhook/clusterresourcebinding
Mohamed Awnallah 14c303022d pkg: test ClusterResourceBinding mutating webhook
In this commit, we introduce unit tests for the `MutatingAdmission`
webhook that mutates the `ClusterResourceBinding` 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 `ClusterResourceBinding`.
- 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:27:01 +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 ClusterResourceBinding mutating webhook 2024-09-13 10:27:01 +03:00