-
Notifications
You must be signed in to change notification settings - Fork 42
lack of tests for currently gardenctl #393
Comments
To make sure the quality, I think we are need focus on the tests as much as we can. for the new feature defintely we need new tests to case, for the exist one which I list in the above we are missing and not fully cover. we need increase the test case to cover it. I think currently all the issue we occured caused by we are missing tests for exist code during our refactoing. The command you mention using currently I am research set up aws/gcp/az cli automatical test, for the other tests I don't have solution yet. welcome any kind of feedback or code contribute. |
@tedteng you're totally right that we need to focus on adding more comprehensive testing but I agree with @neo-liang-sap regarding the subcommands - anything that directly calls a 3rd party component just needs to be verified that it returns successfully.
|
I think I miss the point at the beginning from neo he mentions about test kubectl/kubectx/taerraform itself. I am not talking about testing for subcommand itself, my point same as you guys we don't need test the only test case we need is the subcommand which involved by gardenctl. that the function we need testing. that why I mention we don't have it. I guess that the misunderstanding here. then I added for the test to handle this kind of test which we don't have before. https://github.com/gardener/gardenctl/blob/dc3d2726383a451ad8f6682555c8b5c7790c55d2/.ci/test#L18-L35 |
For the temporary testing, those are good 👍 The same can apply for |
Thanks, @dansible . for those subcommands go files it invokes the different third commands eg (kubeclt, kubectx, terraform etc), the third commands only installed on our local machine. I guess ginkgo may not able to mock it and failure in concourse either. maybe this is the only way we can test our subcommand. welcome any new solutions. Therefore, I suggest we create a docker image which contains those third commands, let me know whether on the right approach. if yes do you know which image repository I should create and use, and pipeline as well? gardener public repository image? pipeline in idefix ? |
If I understand it correctly here the image https://github.com/gardener/ops-toolbelt |
yes as ops-toolbelt is one of the options, in a container to git clone gardenctl code then test it, |
|
will cover in #447
|
Describe the bug
To make sure the code quality we need add more tests to cover the gardenctl code as much as we can to check the code quality every time when we delivery
the following exist testing which I checked only covers test invalid number args, or shoot targeted check. no function test or unit test inside. which means they are not able to check the command function itself whether working well or not.
download_test.go
logs_test.go
show_test.go
ssh_test.go
the following command no automation test case
kubectl.go
kubectx.go
openstack.go
terraform.go
aliyun.go
az.go
aws.go
gcloud.go
The text was updated successfully, but these errors were encountered: