Commit Graph

3 Commits

Author SHA1 Message Date
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
RainbowMango e8164eeebd Adopt controller-runtime braking changes: generics support PR2783
Adopt controller-runtime breaking changes: make decoder as interface. PR2736

Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2024-07-13 16:49:01 +08:00
jwcesign 6a54a9abb4 feat: add permanent id label to pp/cpp/rb/crb/work resources
Signed-off-by: jwcesign <jwcesign@gmail.com>
2024-04-10 16:08:51 +08:00