Commit Graph

7 Commits

Author SHA1 Message Date
changzhen 99c5bf4f22 fix ut failed in federatedresourcequota
Signed-off-by: changzhen <changzhen5@huawei.com>
2024-09-21 16:50:58 +08:00
Mohamed Awnallah d2259d52a1 pkg/webhook: test Multi-Cluster Ingress
In this commit we introduce unit tests for the `Validation Admission`. These
tests ensure correct behavior for various validation scenarios and improve coverage:

- Tests the behavior when decoding the request object fails, verifying
  that admission is denied with an appropriate error message.
- Validates that the webhook denies admission when encountering invalid values in the
  `MultiClusterIngress` spec, ensuring error messaging.
- Confirms that valid `MultiClusterIngress` objects are admitted without errors.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-14 13:13:49 +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
zhy76 adef1e5974 feat: add license and verify license for code file
Signed-off-by: zhy76 <958474674@qq.com>
2023-11-16 11:11:21 +08:00
RainbowMango 4ee4b22f05 Adopt Kubernetes breaking changes: PR 113542 which require singular names for core types
Adopt breaking change of contriller-runtime PR 2122
Adopt breaking change of contriller-runtime PR 2296
Adopt breaking change of controller-runtime PR 2139
Adopt breaking change of controller-runtime PR 2135
Adopt breaking change of Kubernetes PR 116218
Adopt breaking change of controller-runtime PR 2149
Adopt breaking change of controller-runtime PR 2150
Adopt breaking change of controller-runtime PR 2134
Adopt breaking change of controller-runtime PR 2293
Adopt breaking change of controller-runtime PR 2144
Adopt k8s feature: watch list. PR 115402
Adopt breaking change of Kubernetes PR 117102
Adopt Kubernetes change: disable staticcheck
Fix unit tests that failure due to fake-client behavior changes.

Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2023-07-29 16:47:38 +08:00
RainbowMango 26ca04122c Update golangci-lint to v1.52.2
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2023-05-22 11:22:13 +08:00
changzhen c04fd6ad62 add validation for mci
Signed-off-by: changzhen <changzhen5@huawei.com>
2023-05-12 15:49:50 +08:00