Commit Graph

58 Commits

Author SHA1 Message Date
zhzhuang-zju 35c4adf0b2 fix flake test of KarmadactlTopPod
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-12-10 14:28:45 +08:00
zhzhuang-zju a379359cf4 Provide detailed error message when the e2e test fails
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-29 17:31:28 +08:00
hulizhe 1a34a70ef3 enhance top pod command
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-29 10:50:30 +08:00
Mohamed Awnallah c325eee158 test/e2e/karmadactl_test.go: test apply command
In this commit, we add e2e tests for the `karmadactl apply`
command to ensure it handles various scenarios correctly.
The tests include:

- Applying configurations without propagating them into member clusters.
- Applying configurations with propagation into specific member clusters.
- Applying configurations and propagating them to all member clusters.
- Verifying that no resources were created during `--dry-run` mode.
- Ensuring the command returns an error for an invalid flag.
- Ensuring the command returns an error when the specified file does not exist.
- Applying configurations with the `--namespace` flag to ensure resources are created in the specified namespace.
- Applying configurations with the `--force-conflicts` flag to ensure conflicts are forcefully resolved during server-side apply.
- Applying configurations using the `--kustomize` flag to process a kustomization directory.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: zhzhuang-zju <m17799853869@163.com>
Co-authored-by: Chang <changzhen5@huawei.com>
2024-08-20 11:13:00 +00:00
karmada-bot 24de174b35
Merge pull request #5398 from hulizhe/karmadactlexec
enhance karmadactl exec command
2024-08-19 18:14:37 +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 6eae2b9ba9 karmadactl describe e2e test
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 15:38:18 +08:00
hulizhe 37a6dc93d2 karmadactl get e2e test
Signed-off-by: hulizhe <pompeii.hu@gmail.com>
2024-08-19 10:17:21 +08:00
Mohamed Awnallah f59ea2dea6 test/e2e: unfiy random string length generation
In this commit, we unify the generation of random string
length by utilizing `RandomStrLength` global constant.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-08-09 07:56:59 +00: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 8b4e006f03
Merge pull request #5244 from mohamedawnallah/testKarmadactlTaintCommand
test/e2e/karmadactl_test.go: test taint command
2024-08-05 17:23:26 +08:00
Mohamed Awnallah 37af811de6 test/e2e/karmadactl_test.go: test taint command
In this commit, we add e2e tests for the `karmadactl taint`
command to ensure it handles various scenarios correctly.
The tests include:

- Applying taints with different effects (NoSchedule, NoExecute) to a cluster.
- Reapplying taints without the `--overwrite` flag to ensure an error is returned.
- Overwriting existing taints using the `--overwrite` flag.
- Removing taints from a cluster.
- Running the taint command in `--dry-run` mode to ensure no actual changes are made.
- Verifying that taints were not applied during `--dry-run` mode.
- Ensuring the command returns an error for an invalid flag.
- Ensuring the command returns an error when attempting to taint a non-existent cluster.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: zhzhuang-zju <m17799853869@163.com>
2024-08-05 03:48:17 +00:00
zhzhuang-zju 978ea81937 cleanup: Remove redundant e2e testing steps
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-08-03 11:17:11 +08:00
karmada-bot 39e8587649
Merge pull request #4575 from zhzhuang-zju/cpp
complete the e2e test case scenarios for clusterpp
2024-07-24 10:08:15 +08:00
zhzhuang-zju d43a119c0a complete the e2e test case scenarios for clusterpp
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-07-23 16:11:09 +08:00
Mohamed Awnallah cb43384155 test/e2e/karmadactl_test.go: test options command
In this commit, we test `karmadactl options` on listing
all available global options successfully and returning
an error for invalid flag in options.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-19 09:02:56 +00:00
karmada-bot 5e3e5ad513
Merge pull request #5210 from mohamedawnallah/testKarmadactlTokenCommand
test/e2e/karmadactl_test.go: test token command
2024-07-19 16:33:11 +08:00
Mohamed Awnallah 9c65d4e142 test/e2e/karmadactl_test.go: test token command
In this commit, we add tests for the `karmadactl token`
command. These include creating, deleting, listing, and
validating bootstrap tokens. We test scenarios such as
successful token creation and deletion, error handling
for invalid flag, and ensuring the correct format for
tokens. The utility functions `extractTokenIDAndSecret`
and `validateTokenFormat` are used to validate token
format and extract token components.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: zhzhuang-zju <m17799853869@163.com>
2024-07-19 07:41:15 +00:00
Mohamed Awnallah 2a55c98b91 test/e2e: unify access to cluster members
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-19 03:56:15 +00:00
Mohamed Awnallah ad1e76bac2
test/e2e/karmadactl_test.go: test describe command
In this commit, we test `karmadactl describe` command
on existing resource, non-existing resource, non-existing
namespace, and invalid resource type.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-17 10:59:02 +03:00
Mohamed Awnallah d2a47dde53
test/e2e/karmadactl_test.go: test get command
In this commit, we test `karmadactl get` command
on existing resource, non-existing resource, and
invalid resource type.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-17 09:44:31 +03:00
Mohamed Awnallah 1fc977e38c
test/e2e/karmadactl_test.go: test version command
In this commit, we test `karmadactl version` command to
make sure it return valid information and return error
when invalid flag is provided.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-17 06:40:45 +03:00
Mohamed Awnallah 09ec78933d test/e2e/karmadactl_test.go: test logs command
In this commit, we test `karmadactl logs` command
on existing cluster, existing pod, non-existing pod,
non-existing cluster, and invalid input.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-15 10:32:42 +00:00
karmada-bot 2a2db3fd9b
Merge pull request #4436 from Vacant2333/add-e2e-coverage-detail
docs: add e2e coverage detail
2023-12-25 16:19:20 +08:00
Vacant2333 60b2e4af22 add e2e coverage detail
Signed-off-by: Vacant <vacant@MasterNode.local>
2023-12-23 18:07:31 +08:00
Zhizhen He 25a62c6c57
fix typo
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-12-17 16:12:03 +08:00
karmada-bot 652c25436d
Merge pull request #4252 from zhzhuang-zju/e2e-top-pod
e2e: add e2e test for command karmadactl top pod
2023-12-13 09:22:10 +08:00
zhzhuang-zju 4fa7d48502 e2e: add e2e test for command karmadactl top pod
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2023-12-12 15:43:09 +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
jwcesign aad72aecd2 e2e: adjust all karmadactl e2e to use real karmadactl command
Signed-off-by: jwcesign <jwcesign@gmail.com>
2023-11-15 11:08:27 +08:00
jwcesign d1ce33f9e8 e2e: adjust karmadactl e2e to use real command
Signed-off-by: jwcesign <jwcesign@gmail.com>
2023-11-14 10:28:50 +08:00
jwcesign 5e90907819 fix: fix exec failure when tls enabled
Signed-off-by: jwcesign <jwcesign@gmail.com>
2023-11-09 10:39:01 +08:00
zhangdiandian 4baaf12887 fix spell errors in test and docs
Signed-off-by: zhangdiandian <1635468471@qq.com>
2023-10-31 03:38:07 +00:00
LronDC f9b1071c3c Add --auto-generate-propagation-policy and --propagation-policy-name options to promote command
Signed-off-by: LronDC <lun.su@daocloud.io>
2023-05-12 18:53:43 +08:00
jwcesign 8acd1a4503 Delete the redundant logic in func GenerateExecutionSpaceName
Signed-off-by: jwcesign <jiangwei115@huawei.com>
2022-12-28 15:59:24 +08:00
lonelyCZ faa6b64cd6 Package subcommands of karmadactl to make it clearer
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-10 14:31:57 +08:00
lonelyCZ 3dc11037cc karmadactl join/unjoin use factory to access control plane
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-07 16:02:45 +08:00
lonelyCZ 7b44385441 karmadactl promote uses factory to access cluster
Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
2022-11-04 15:18:48 +08:00
helen be4b3c829a karmadactl cordon&uncordon uses factory to access cluster
Signed-off-by: helen <helenfrank@protonmail.com>
2022-10-04 17:33:13 +08:00
changzhen 5425954372 fix flaking-test: cordon cluster taint check
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-09-28 17:13:18 +08:00
changzhen 79b1284494 replace gomeme.Eventually with wait when logic has assertions
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-09-20 19:39:19 +08:00
changzhen 1b57dfcc43 fix flaking test: karmadactl uncordon taint check
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-09-13 11:19:10 +08:00
karmada-bot 71d037be0b
Merge pull request #2474 from ikaven1024/fix_deploy
do not switch context when deploy karmada
2022-09-06 11:56:07 +08:00
yingjinhui 17789e05a9 add karmadaContext to e2e runner.
Signed-off-by: yingjinhui <yingjinhui@didiglobal.com>
2022-09-06 02:08:18 +08:00
Poor12 868a224064 add e2e for cluster status collection
Signed-off-by: Poor12 <shentiecheng@huawei.com>
2022-09-01 15:02:38 +08:00
carlory a78bc65af5 remove unused flag for karmadactl promote
Signed-off-by: carlory <baofa.fan@daocloud.io>
2022-07-15 07:23:48 +08:00
changzhen 4fd90cc448 fix flake e2e case: Karmadactl unjoin testing
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-07-13 10:45:45 +08:00
lonelyCZ 8c2b50b72e Fix check whether deployment propagated to member cluster
Signed-off-by: lonelyCZ <531187475@qq.com>
2022-07-07 20:45:18 +08:00
changzhen a2dfd883ef extend the waiting time for CI cluster unjoin
Signed-off-by: changzhen <changzhen5@huawei.com>
2022-07-04 16:57:53 +08:00
carlory c1e5f1f0a1 dix karmadactl e2e
Signed-off-by: carlory <baofa.fan@daocloud.io>
2022-06-29 11:22:05 +08:00