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> |
||
---|---|---|
.. | ||
mutating.go | ||
mutating_test.go |