Commit Graph

3096 Commits

Author SHA1 Message Date
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
karmada-bot e76ce6355b
Merge pull request #5400 from whitewindmills/apienablement-condition
add new cluster condition: CompleteAPIEnablements
2024-09-14 09:39:00 +08:00
Mohamed Awnallah fe408f9ad6 pkg/webhook: refactor Federated Resource Quota
In this commit, we refactor `FederatedResourceQuota` webhook
mainly matching on substrings instead of whole strings for reliability
and resilience and reformat the test case names to follow format
`Function_Scenario_ExpectedResult` for better readability.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 19:29:17 +03:00
whitewindmills 3307a52627 add new cluster condition: IncompleteAPIEnablements
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-09-13 17:40:24 +08:00
karmada-bot 2e60a6e8a5
Merge pull request #5494 from mohamedawnallah/unitTestClusterPropagationPolicy
pkg/webhook: unit test cluster propagation policy
2024-09-13 16:36:59 +08:00
karmada-bot c3d582ba31
Merge pull request #5537 from mohamedawnallah/refactorPropagationPolicyTest
pkg/webhook: refactor Propagation Policy test
2024-09-13 16:10:59 +08:00
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
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
Mohamed Awnallah f19f9c4a45 pkg/webhook: test OverridePolicy
In this commit, we introduce unit tests for both the `ValidationAdmission`
and `MutatingAdmission` webhooks specifically for the `OverridePolicy` resource.

- Validation webhook tests:
  - 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
    label values in the `OverridePolicy` spec, ensuring proper error messaging.
  - Confirms that valid `OverridePolicy` objects are admitted without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of policy mutation, including setting default
    namespaces and validating no unnecessary patches.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:14:04 +03:00
Mohamed Awnallah 87958641ae pkg/webhook: test ClusterPropagationPolicy
In this commit, we introduce unit tests for both the `ValidatingAdmission`
and `MutatingAdmission` webhooks for the `ClusterPropagationPolicy` resource.

The tests include:

- Validation webhook tests:
  - Tests how the webhook responds when decoding the request object fails.
  - Ensures updates to the `SchedulerName` field are denied, as it should remain immutable.
  - Validates that changes to the `ClusterPropagationPolicyPermanentIDLabel` label and its absence in creation requests are correctly handled.
  - Confirms that valid `ClusterPropagationPolicy` objects are allowed through without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of cluster policy mutation with default values and patch application.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:08:43 +03:00
Mohamed Awnallah 368b4b171d pkg/webhook: refactor propagation policy
In this commit, we refactor propagation policy names and check
on number of patches the mutation happens.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 09:56:50 +03:00
Anuj Agrawal 6bbbf9d8ae Added tests for federatedresourcequota controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for federatedresourcequota controller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-09-13 09:58:36 +05:30
Xinzhao Xu 19c0b4cbfa Remove me from resourceinterpreter OWNERS
Signed-off-by: Xinzhao Xu <z2d@jifangcheng.com>
2024-09-12 16:38:37 +08:00
karmada-bot 02e5e922e9
Merge pull request #5517 from mohamedawnallah/unitTestMultiClusterService
pkg/webhook: unit test Multi-Cluster Service
2024-09-12 15:58:59 +08:00
Mohamed Awnallah bd847422af pkg/webhook: test Work
In this commit, we introduce unit tests for the `MutatingAdmission`
webhook specifically for the `Work` resource. The mutation webhook
tests include the following:

- Handles decode errors and denies admission when decoding fails.
- Provides full coverage of policy mutation, including setting default
  and validating no unnecessary patches.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-12 07:28:03 +03:00
Mohamed Awnallah d5c9a9d803 pkg/webhook: test Multi-Cluster Service
In this commit, we introduce unit tests for both the `ValidationAdmission`
and `MutatingAdmission` webooks specifically for the `MultiClusterService` resource.

- Validation webhook tests:
  - 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 `MultiClusterService` spec, ensuring error messaging.
  - Confirms that valid `MultiClusterService` objects are admitted without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of `MultiClusterService` object mutation,
    including setting default namespaces and validating no unnecessary patches.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-12 07:27:34 +03:00
karmada-bot 671372acb2
Merge pull request #5528 from anujagrawal699/addedTests-controllers/federatedhpa
Added tests for federatedhpa controller
2024-09-12 12:14:58 +08:00
karmada-bot 927dc33d58
Merge pull request #5521 from mohamedawnallah/logMutatingWebhookHandlers
pkg/webhook: log mutating handlers in `OverridePolicy`, `ClusterPropagationPolicy`, and `MultiClusterService`
2024-09-12 10:47:58 +08:00
Anuj Agrawal 337f787963 Added tests for federatedhpa controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for federatedhpa controller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-09-11 19:37:49 +05:30
chaosi-zju e7db9d74b0 remove redundant launch arguments when install estimator by karmadactl
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
2024-09-11 16:59:28 +08:00
zhzhuang-zju 4dfb1efe0c karmada-scheduler-estimator add the support for custom DNS suffix
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-11 14:14:07 +08:00
Mohamed Awnallah df270fab91 pkg/webhook: log mutating webhook handlers
In this commit, we log the mutating handlers for `OverridePolicy`,
`ClusterPropagationPolicy`, and `MultiClusterService`. Specifically, it logs
information about the mutation of these resources, including the namespace,
name, and the operation type from the admission request.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-11 07:53:16 +03:00
karmada-bot 4ac95b95a1
Merge pull request #5508 from mohamedawnallah/unifyUsingPolicyV1Alpha1Operators
pkg+test: unify the usage of policyv1alpha1 operators
2024-09-11 12:05:57 +08:00
Lan Liang 0395765962 Update karmada-apiserve and kube-controller-manager to v1.30.4 by default.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-09-10 13:59:13 +00:00
karmada-bot 07e297681c
Merge pull request #5478 from jabellard/estimator_service_namespace
Add the Ability to Specify the Namespace Used for Discovering Scheduler Estimator Services
2024-09-10 19:41:56 +08:00
karmada-bot ca1b2ce3c7
Merge pull request #5492 from mohamedawnallah/unitTestPropagationPolicy
pkg/webhook: unit test propagation policy
2024-09-10 14:13:56 +08:00
karmada-bot 2577b5f63e
Merge pull request #5499 from mohamedawnallah/unitTestResourceDeletionProtectionWebhook
pkg/webhook: unit test resource deletion protection
2024-09-10 11:44:56 +08:00
Mohamed Awnallah e2a3f5942c pkg/webhook: test PropagationPolicy
In this commit, we introduce unit tests for both the `ValidatingAdmission`
and `MutatingAdmission` webhooks for the `PropagationPolicy` resource.

The tests include:

- Validation webhook tests:
  - Tests how the webhook responds when decoding the request object fails.
  - Ensures that updates to the `SchedulerName` field are denied, as it should remain immutable.
  - Validates that changes to the `PropagationPolicyPermanentIDLabel` label and its absence in creation requests are correctly handled.
  - Confirms that valid `PropagationPolicy` objects are allowed through without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of policy mutation with default values and patch application.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-10 06:39:20 +03:00
karmada-bot aaae246280
Merge pull request #5487 from zhzhuang-zju/namespace
fix: command create cannot specify the namespace
2024-09-10 11:32:56 +08:00
karmada-bot 4668cf0808
Merge pull request #5321 from tiansuo114/node
Support multiple label selection ability in EtcdNodeSelectorLabels
2024-09-10 11:07:57 +08:00
zhzhuang-zju 4a2dc3d935 fix: command create cannot specify the namespace
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-10 10:23:09 +08:00
Mohamed Awnallah be87fd5e71 pkg+test: unify usage of policyv1alpha1 operators
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-09 22:56:47 +03:00
Mohamed Awnallah e5169f8889 pkg/webhook: test FederatedHPA
In this commit, we introduce unit tests for both the `MutatingAdmission`
and `ValidatingAdmission` webhooks specifically for the `FederatedHPA`
resource.

The tests include:

- Validation webhook tests:
  - Verifies that admission is denied with an appropriate error message
    when decoding the request object fails.
  - Ensures admission is denied when the `FederatedHPA` spec contains
    invalid values, such as a `minReplicas` set to zero, and the correct
    error message is returned.
  - Confirms that a valid `FederatedHPA` object is allowed through without
    errors.

- Mutation webhook tests:
  - Verifies that admission is denied when decoding the request object
    fails, returning the appropriate error message.
  - Ensures that the `FederatedHPA` object is correctly mutated when
    provided with default values, including scale policies and CPU
    utilization.
  - Confirms that no patches are applied when the `FederatedHPA` object is
    handled correctly and that admission is allowed for valid
    `FederatedHPA` objects.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-09 15:51:02 +03:00
karmada-bot 54b90a2ff2
Merge pull request #5467 from xovoxy/cluster-ut
add test for pkg/controllers/cluster
2024-09-09 20:21:56 +08:00
tiansuo114 2c57ebae0e
Support multiple label selection ability in EtcdNodeSelectorLabels
Signed-off-by: tiansuo114 <1729765480@qq.com>

fix ci

Signed-off-by: tiansuo114 <1729765480@qq.com>

add unit test

Signed-off-by: tiansuo114 <1729765480@qq.com>

change unit test

Signed-off-by: tiansuo114 <1729765480@qq.com>

rm mapsEqual

Signed-off-by: tiansuo114 <1729765480@qq.com>

fix

Signed-off-by: tiansuo114 <1729765480@qq.com>

1111111111111111111111

Signed-off-by: tiansuo114 <1729765480@qq.com>

Update pkg/karmadactl/cmdinit/cmdinit.go

Co-authored-by: zhzhuang-zju <m17799853869@163.com>

use metav1.ParseToLabelSelector

Signed-off-by: tiansuo114 <1729765480@qq.com>

delete useless test

Signed-off-by: tiansuo114 <1729765480@qq.com>

11

Signed-off-by: tiansuo114 <1729765480@qq.com>

fix

Signed-off-by: tiansuo114 <1729765480@qq.com>
2024-09-09 20:05:23 +08:00
Joe Nathan Abellard b6fbcb4353 Add the ability to specify namespace to be used for discovering scheduler estimator services
Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Address comments

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Address comments

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>
2024-09-09 07:21:57 -04:00
Anuj Agrawal e648c1bedb Added tests for cronfederatedhpa controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/controllers/cronfederatedhpa

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for controllers/cronfederatedhpa

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-09-09 14:44:12 +05:30
Mohamed Awnallah fa4a077865 pkg: test ResourceDeletionProtection valid webhook
In this commit, we add unit tests for the `ValidatingAdmission` validation webhook
specifically for the resource deletion protection feature. These tests ensure
that the webhook correctly handles various admission scenarios:

- Tests the behavior when decoding the request object fails, verifying that admission
is denied with an appropriate error message.
- Ensures that resources labeled with `DeletionProtectionAlways` are denied deletion,
validating that the error message is returned.
- Confirms that resources without the deletion protection label are allowed to be deleted
without errors.
- Validates that resources with other labels are not impacted and are allowed to be deleted.
- Confirms that non-delete operations (e.g., create) are allowed by default.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-09 03:56:52 +03:00
Mohamed Awnallah 5a2e714a3b pkg: test ClusterOverridePolicy validation webhook
In this commit, we add unit tests for the `ValidationAdmission`
webhook specifically for the `ClusterOverridePolicy` resource. These
tests ensure that the webhook correctly handles various admission
scenarios:

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

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-09 03:26:49 +03:00
xovoxy 503fb93068 add test for pkg/controllers/cluster
Signed-off-by: xovoxy <xilovele@gmail.com>
2024-09-08 19:56:21 +08:00
karmada-bot 32c2ef7aa4
Merge pull request #5430 from spiritNO1/fix_aggregated
fix: aggregate apiserver http method to get
2024-09-06 09:22:52 +08:00
ahorine 5d2cf3ef7e feat: Added 's' shorthand to operation-scope flags
The operation-scope flag gets used a lot when examining resources on
member clusters. The 's' shorthand was added to improve user QoL.

Signed-off-by: ahorine <allen.horine@gmail.com>
2024-09-04 16:52:46 -04:00
zhzhuang-zju d351e3dc72 add commandGroup annotation to ctl command
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-04 16:47:38 +08:00
zhzhuang-zju e2392fb07c chore: remove redundancy certificate configuration
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-03 20:07:23 +08:00
karmada-bot 350838dc22
Merge pull request #5029 from XiShanYongYe-Chang/remove-pp-name-length-limit
Remove pp/cpp name length limit
2024-08-31 11:28:48 +08:00
karmada-bot cb5be63eea
Merge pull request #5462 from mohamedawnallah/reformatInterpretHelpCommand
pkg/karmadactl/interpret/interpret.go: Reformat `karmadactl interpret --help` output
2024-08-30 17:50:47 +08:00
karmada-bot 704a873433
Merge pull request #5463 from zhzhuang-zju/karmadactlpatch
add new command patch
2024-08-30 16:50:48 +08:00
karmada-bot 307fee92ec
Merge pull request #5447 from NishantBansal2003/unit-test-dependenciesdistributor
Improved test coverage for dependencies_distributor in pkg/dependenciesdistributor
2024-08-30 16:49:47 +08:00
zhzhuang-zju 8cb9f4224c add new command patch
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-30 10:31:06 +08:00
Mohamed Awnallah 48e6fe7e0f pkg/karmadactl/interpret/interpret.go: chore help
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-08-29 18:53:48 +00:00
karmada-bot 6d26feb77c
Merge pull request #5458 from zhzhuang-zju/karmadactlannotate
add new command annotate
2024-08-29 21:17:47 +08:00
karmada-bot 10cc29ae92
Merge pull request #5453 from zhzhuang-zju/karmadactllabel
add new command label
2024-08-29 19:47:46 +08:00
zhzhuang-zju 65f686e473 add new command annotate
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-29 19:47:08 +08:00
karmada-bot bd483c141d
Merge pull request #5454 from whitewindmills/words-cleanup
Fix spelling errors
2024-08-29 19:43:46 +08:00
圣朋 48b03df9c9 fix: aggregate apiserver http method to get
Signed-off-by: 圣朋 <sp441185@alibaba-inc.com>
2024-08-29 17:59:12 +08:00
zhzhuang-zju 8b21a65f97 add new command label
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-29 16:02:12 +08:00
whitewindmills b4ad838227 Fix spelling errors
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-08-29 15:58:05 +08:00
Nishant Bansal 3e5ea52ac6 Improved test coverage for dependencies_distributor in pkg/dependenciesdistributor
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2024-08-29 12:49:20 +05:30
karmada-bot 47cea6a84d
Merge pull request #5432 from spiritNO1/fix_url
fix: remove extra slash when constructing member cluster URL if the apiEndpoint of the cluster object ends with a slash
2024-08-29 12:20:46 +08:00
hulizhe 1a34a70ef3 enhance top pod command
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-29 10:50:30 +08:00
karmada-bot 2efe03fac9
Merge pull request #5441 from RainbowMango/pr_bump_custom-metrics-apiserver
Bump custom-metrics-server to v1.30.0
2024-08-28 22:05:45 +08:00
圣朋 f5f351bd4a fix: remove extra slash when constructing member cluster URL to adapt the apiEndpoint of the cluster object ends with a slash.
Signed-off-by: 圣朋 <sp441185@alibaba-inc.com>
2024-08-28 17:47:32 +08:00
whitewindmills e13d06b70d skip descheduling ResourceBinding which is being deleted
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-08-28 17:05:03 +08:00
RainbowMango a968ff3d8b Bump custom-metrics-server to v1.30.0 which requires Kubernetes v1.30 as the main module
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2024-08-28 15:23:06 +08:00
karmada-bot 295dee80dc
Merge pull request #5381 from xovoxy/cert-rotation-ut
Improve test coverage for /pkg/controllers/certificate, with a minor optimization
2024-08-28 15:17:45 +08:00
karmada-bot d16f0985ec
Merge pull request #5437 from liangyuanpeng/scheduler_options
Standardize the health probe and metrics arguments of scheduler.
2024-08-28 09:11:45 +08:00
Lan Liang 0fceab521a Standardize the health probe and metrics arguments of scheduler.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-08-27 12:37:21 +00:00
karmada-bot a184b40a56
Merge pull request #5434 from zhzhuang-zju/karmadactledit
add new command edit
2024-08-27 20:28:45 +08:00
zhzhuang-zju e9c1df6828 add new command edit
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-27 19:35:13 +08:00
karmada-bot 9a678b65f0
Merge pull request #5290 from seanlaii/controller-manager-options
Standardize the health probe argument of karmada-controller-manager
2024-08-27 18:37:45 +08:00
karmada-bot 8320ccf7fb
Merge pull request #5435 from whitewindmills/descheduler-options
Standardize the health probe and metrics arguments of descheduler
2024-08-27 17:55:45 +08:00
wei-chenglai f6d022f799 Standardize the health probe argument of karmada-controller-manager
Signed-off-by: wei-chenglai <qazwsx0939059006@gmail.com>
2024-08-27 16:29:01 +08:00
karmada-bot 98b2bda5fb
Merge pull request #5427 from yashpandey06/pkg/estimator/client/service
Added tests for service file in pkg/estimator/client
2024-08-27 16:20:44 +08:00
Yash Pandey ec419583bb Added unit tests for service in pkg/estimator/client
Signed-off-by: Yash Pandey <yash.pandey@agoda.com>
2024-08-27 12:02:02 +05:30
whitewindmills d9ecf2a9ca Standardize the health probe and metrics arguments of descheduler
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-08-27 14:32:00 +08:00
karmada-bot 608af763e1
Merge pull request #5412 from yashpandey06/test/search/proxy
Added UTs for proxy file 80% coverage
2024-08-27 14:20:44 +08:00
karmada-bot 8f6425b81a
Merge pull request #5273 from seanlaii/estimator-options
Standardize the health probe and metrics arguments of scheduler-estimator
2024-08-27 13:52:44 +08:00
Yash Pandey 332e235214 Added tests in pkg/registry
Signed-off-by: Yash Pandey <yash.pandey@agoda.com>
2024-08-27 09:57:03 +05:30
wei-chenglai c266e4b234 Standardize the health probe & metrics arguments of scheduler-estimator
Signed-off-by: wei-chenglai <qazwsx0939059006@gmail.com>
2024-08-27 11:49:42 +08:00
zhzhuang-zju 764bf58f1a add new command delete
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-27 09:52:25 +08:00
karmada-bot 19d1146c35
Merge pull request #5413 from NishantBansal2003/unit-test-detector
Improved test coverage for preemption in pkg/detector
2024-08-27 09:35:44 +08:00
Nishant Bansal 134b29cd60 Improved test coverage for preemption in pkg/detector
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2024-08-26 16:11:00 +05:30
hulizhe 216b465e98 add new command explain
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-26 17:29:00 +08:00
karmada-bot e13518de1e
Merge pull request #5394 from hulizhe/karmadactlapiresource
add new command karmadactl api-resources
2024-08-26 16:40:44 +08:00
karmada-bot 444b1b5876
Merge pull request #5395 from hulizhe/karmadactlattach
add new command karmadactl attach
2024-08-26 16:22:44 +08:00
karmada-bot 98ddb139fa
Merge pull request #5416 from NishantBansal2003/ut-policy-detector
Improved test coverage for policy in pkg/detector
2024-08-26 16:04:44 +08:00
hulizhe 55c8f909f9 add new command attach
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-26 15:21:30 +08:00
karmada-bot cc12739480
Merge pull request #5366 from anujagrawal699/addedTests-pkg/util/fedinformer
Added tests pkg/util/fedinformer
2024-08-26 15:15:44 +08:00
karmada-bot 6eb86ab706
Merge pull request #5399 from hulizhe/karmadactlcreate
add new command karmadactl create
2024-08-26 15:12:44 +08:00
karmada-bot d12df248ce
Merge pull request #4224 from zhzhuang-zju/ctl-top-node
karmadactl supports top node
2024-08-26 12:09:43 +08:00
karmada-bot 3757a2af50
Merge pull request #5421 from NishantBansal2003/ut-dependenciesdistributor
Improved test coverage for dependencies_distributor in pkg/dependenciesdistributor
2024-08-26 11:32:44 +08:00
karmada-bot 4eea6da77d
Merge pull request #5403 from a7i/work-status-suspend
fix: work status sync when work dispatching is suspended
2024-08-26 10:31:43 +08:00
Nishant Bansal ba39fded7f Improved test coverage for dependencies_distributor in pkg/dependenciesdistributor
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2024-08-25 18:27:44 +05:30
Nishant Bansal 860f3032aa Improved test coverage for policy in pkg/detector
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2024-08-24 19:51:59 +05:30
karmada-bot aee21b8f48
Merge pull request #5408 from anujagrawal699/addedTests-pkg/servicenameresolutiondetector
Added tests for pkg/servicenameresolutiondetector
2024-08-24 17:08:42 +08:00
Anuj Agrawal 147ede0284 Added tests for pkg/servicenameresolutiondetector
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/servicenameresolutiondetector

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/servicenameresolutiondetector

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/servicenameresolutiondetector

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-23 10:24:10 +05:30
xovoxy 5e66106f85 Improve test coverage for /pkg/controllers/certificate, with a minor optimization
Signed-off-by: xovoxy <xilovele@gmail.com>
2024-08-23 12:49:14 +08:00
karmada-bot bcf68fadcb
Merge pull request #5409 from NishantBansal2003/ut-detector
Improved test coverage for policy in pkg/detector
2024-08-23 10:24:41 +08:00
Anuj Agrawal daf29c5112 Added test files for pkg/util/fedinformer
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-22 15:47:38 +05:30
karmada-bot dc1669db71
Merge pull request #5388 from yashpandey06/test/binding
Added tests in pkg/binding for condition coverage
2024-08-22 10:31:41 +08:00
Vamshi Maskuri 49adbf8204 refactor
Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>

add review comments

Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>

fix lint
2024-08-21 22:28:42 +05:30
Yash Pandey 7bef0986ca Added and modified tests in binding common
Signed-off-by: Yash Pandey <yash.pandey@agoda.com>
2024-08-21 15:38:25 +05:30
Nishant Bansal 87da9a9bc1 Improved test coverage for policy in pkg/detector
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2024-08-20 23:42:40 +05:30
Amir Alavi 5f54261725
fix: work status sync when work dispatching is suspended
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-08-20 10:45:15 -04:00
karmada-bot d4bfbb5a70
Merge pull request #5390 from NishantBansal2003/unit-tests-detector
Improved test coverage for handler in pkg/detector
2024-08-20 11:40:38 +08:00
karmada-bot 2c1e0f8b4e
Merge pull request #5368 from anujagrawal699/addedTests-pkg/controllers/namespace
Added test for namespace controller
2024-08-20 10:53:38 +08:00
zhzhuang-zju 3af667c62c karmadactl supports top node
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-19 20:06:32 +08:00
karmada-bot 24de174b35
Merge pull request #5398 from hulizhe/karmadactlexec
enhance karmadactl exec command
2024-08-19 18:14:37 +08:00
karmada-bot 7307e2e1fb
Merge pull request #5227 from XiShanYongYe-Chang/fix-remedy-ci-failed
fix the error of cluster status old condition update will overwrite the newest condition
2024-08-19 18:07:38 +08:00
hulizhe a6aa08e6b3 add new command karmadactl create
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 17:16:44 +08:00
changzhen b59761efcf fix error of when cluster status condition update
Signed-off-by: changzhen <changzhen5@huawei.com>
2024-08-19 16:34:50 +08:00
hulizhe 914d57ca89 enhance karmadactl exec command
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 16:10:57 +08:00
hulizhe 668a994bf9 add new command karmadactl api-resources
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 15:57:26 +08:00
hulizhe 2249abd818 enhance karmadactl describe command
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 15:37:52 +08:00
karmada-bot f3ae66ba60
Merge pull request #5254 from hulizhe/karmadactlget
Enhance the capabilities of the karmadactl get command
2024-08-19 12:01:38 +08:00
karmada-bot 40e3337e14
Merge pull request #5372 from NishantBansal2003/unit-tests-resourceinterpreter
Improved test coverage for default.go and other related files in pkg/resourceinterpreter
2024-08-19 11:50:38 +08:00
hulizhe 99ef7a3b59 enhance karmadactl get command
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 10:16:46 +08:00
Anuj Agrawal 4cc0c20a7c Added tests for namespace controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-17 20:50:49 +05:30
Anuj Agrawal b00fac8069 Added tests for namespace controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-17 19:15:53 +05:30
Nishant Bansal ad9c16d5a8 Improved test coverage for handler in pkg/detector
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2024-08-16 23:18:08 +05:30
Nishant Bansal 2818bae8ff Improved test coverage for default.go and other related files in pkg/resourceinterpreter
Signed-off-by: Nishant Bansal <nishant.bansal.mec21@iitbhu.ac.in>
2024-08-16 16:32:31 +05:30
changzhen 911cc44974 remove pp/cpp name length limit
Signed-off-by: changzhen <changzhen5@huawei.com>
2024-08-16 10:34:15 +08:00
karmada-bot e7cb1332c5
Merge pull request #5318 from chaosi-zju/fixpatch
fix expected patch operations may be missed when AggregateStatus
2024-08-16 10:29:35 +08:00
Amir Alavi b27e669f48
fix: allow suspended work to get deleted
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-08-15 09:03:06 -04:00
Anuj Agrawal 633f5ba31e Added tests for namespace controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-14 22:33:20 +05:30
karmada-bot bfa5839d36
Merge pull request #5364 from anujagrawal699/improveTestCoverage-pkg/descheduler
Improve test coverage of pkg/descheduler
2024-08-14 17:35:34 +08:00
chaosi-zju 478b8c6456 fix expected patch operations may be missed when AggregateStatus
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
2024-08-14 15:21:44 +08:00
Anuj Agrawal 57575675ef Added test for namespace controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-14 12:32:41 +05:30
karmada-bot e5757115c2
Merge pull request #5358 from NishantBansal2003/resourceinterpreter-ut-coverage
Improved test coverage for replica in pkg/resourceinterpreter
2024-08-13 21:13:34 +08:00
Anuj Agrawal 810ca89e69 Added tests and improved test coverage of pkg/descheduler
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-13 17:36:21 +05:30
Anuj Agrawal 9e67017305 Added new test file and Improved Test Coverage of descheduler package
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-13 15:35:53 +05:30
karmada-bot e5b1298608
Merge pull request #5339 from NishantBansal2003/coverage-util-files
Add 100% test coverage for matcher, shadow, and names.go in pkg/util
2024-08-13 17:07:32 +08:00
Nishant Bansal e6a7b49a58 Improved test coverage for replica in pkg/resourceinterpreter
Signed-off-by: Nishant Bansal <nishant.bansal.mec21@iitbhu.ac.in>
2024-08-13 12:52:46 +05:30
karmada-bot 8526486681
Merge pull request #5346 from NishantBansal2003/ut-resourceinterpreter-files
Add test coverage for revisereplica and retain in pkg/resourceinterpr…
2024-08-13 10:38:33 +08:00
karmada-bot 62c5d8bca2
Merge pull request #5338 from anujagrawal699/improveTestCoverage-pkg/util/eventfilter
Added new test cases and improved test coverage of pkg/util/eventfilter
2024-08-13 10:31:33 +08:00
Yash Pandey 4d49f36d09 Added unit test cluster_condition coverage : 100% (squashed commit)
Signed-off-by: Yash Pandey <yash.pandey@agoda.com>

Signed-off-by: Yash Pandey <yash.pandey@agoda.com>
2024-08-12 17:59:07 +05:30
Nishant Bansal 95b91845a0 Add test coverage for revisereplica and retain in pkg/resourceinterpreter/
Signed-off-by: Nishant Bansal <nishant.bansal.mec21@iitbhu.ac.in>
2024-08-12 15:17:58 +05:30
karmada-bot 034b5d4ccf
Merge pull request #5342 from xovoxy/binding-ut
Improve test coverage for /pkg/controllers/binding
2024-08-12 15:20:31 +08:00
xovoxy effcc6c899 Improve test coverage for /pkg/controllers/binding
Signed-off-by: xovoxy <xilovele@gmail.com>
2024-08-09 22:19:05 +08:00
Nishant Bansal 95b421dd55 Add 100% test coverage for matcher, shadow, and names.go in pkg/util
Signed-off-by: Nishant Bansal <nishant.bansal.mec21@iitbhu.ac.in>
2024-08-09 17:43:11 +05:30
Anuj Agrawal 95e3da96ec Added new test cases and improved test coverage of pkg/util/eventfilter
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-08-09 16:09:53 +05:30
Amir Alavi 8f707f35b4
work suspension: emit event for work dispatch status
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>

fix lint

fix lint
2024-08-09 06:15:05 -04:00
karmada-bot 37488bd109
Merge pull request #5331 from NishantBansal2003/unit-tests-util-common
Add unit tests for common.go in pkg/util
2024-08-09 17:53:29 +08:00
Nishant Bansal bf0294be91 Add unit tests for common.go in pkg/util
Signed-off-by: Nishant Bansal <nishant.bansal.mec21@iitbhu.ac.in>
2024-08-09 14:14:33 +05:30
karmada-bot 6e9136d5e9
Merge pull request #5310 from anujagrawal699/improveTestCoverage-pkg/controllers/context
Improve test coverage of pkg/controllers/context
2024-08-09 15:51:29 +08:00
karmada-bot 052b06ecc2
Merge pull request #5333 from a7i/duplicate-import
chore: remove duplicate imports
2024-08-09 14:52:29 +08:00
karmada-bot fa05f9b600
Merge pull request #5317 from a7i/work-suspend-work-status-conditions
work suspension: work status conditions
2024-08-09 14:45:29 +08:00
Amir Alavi 010d38954e
chore: remove duplicate imports
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
2024-08-08 23:22:37 -04:00
karmada-bot 5a10d75828
Merge pull request #5324 from chaosi-zju/fixut
repair the test for rb status controller
2024-08-08 16:55:29 +08:00
karmada-bot c3c90efeeb
Merge pull request #5316 from qinguoyi/perf-findpath
perf:make findFeasiblePaths faster
2024-08-08 13:50:28 +08:00