karmada/pkg/webhook/federatedresourcequota
Mohamed Awnallah 7373ab303e pkg: test `federatedresourcequota` webhook
In this commit, we add unit tests for the `FederatedResourceQuota`
validation logic and its related components. The tests ensure that
the validation logic correctly handles various scenarios, including:

- Validating `FederatedResourceQuota` specifications with appropriate resource assignments.
- Detecting cases where overall resource limits are less than the assigned resources.
- Handling scenarios where resource names in assignments do not exist in the overall resources.
- Validating `FederatedResourceQuotaStatus` to ensure standard resource types and correct cluster names.
- Handling invalid resource lists in both `Overall` and `AggregatedStatus`.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-08-01 02:39:44 +00:00
..
validating.go Adopt controller-runtime braking changes: generics support PR2783 2024-07-13 16:49:01 +08:00
validating_test.go pkg: test `federatedresourcequota` webhook 2024-08-01 02:39:44 +00:00