kubekey
kubekey copied to clipboard
Add an unit test framework for kubekey
Currently, the test coverity is very low. We need to add an unit test framework for KK command to simulate all kinds of cases
$ go test ./... -coverprofile cover.out
? github.com/kubesphere/kubekey [no test files]
? github.com/kubesphere/kubekey/apis/kubekey/v1alpha1 [no test files]
? github.com/kubesphere/kubekey/clients/clientset/versioned [no test files]
? github.com/kubesphere/kubekey/clients/clientset/versioned/fake [no test files]
? github.com/kubesphere/kubekey/clients/clientset/versioned/scheme [no test files]
? github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha1 [no test files]
? github.com/kubesphere/kubekey/clients/clientset/versioned/typed/kubekey/v1alpha1/fake [no test files]
? github.com/kubesphere/kubekey/clients/informers/externalversions [no test files]
? github.com/kubesphere/kubekey/clients/informers/externalversions/internalinterfaces [no test files]
? github.com/kubesphere/kubekey/clients/informers/externalversions/kubekey [no test files]
? github.com/kubesphere/kubekey/clients/informers/externalversions/kubekey/v1alpha1 [no test files]
? github.com/kubesphere/kubekey/clients/listers/kubekey/v1alpha1 [no test files]
# github.com/kubesphere/kubekey/pkg/cluster/upgrade
pkg/cluster/upgrade/precheck.go:114:4: Println arg list ends with redundant newline
? github.com/kubesphere/kubekey/cmd [no test files]
? github.com/kubesphere/kubekey/cmd/kk [no test files]
ok github.com/kubesphere/kubekey/controllers/kubekey 3.978s coverage: 0.0% of statements
? github.com/kubesphere/kubekey/pkg/addons [no test files]
? github.com/kubesphere/kubekey/pkg/addons/charts [no test files]
? github.com/kubesphere/kubekey/pkg/addons/manifests [no test files]
? github.com/kubesphere/kubekey/pkg/bootstrap/configuration [no test files]
? github.com/kubesphere/kubekey/pkg/bootstrap/dependencies [no test files]
? github.com/kubesphere/kubekey/pkg/bootstrap/registry [no test files]
? github.com/kubesphere/kubekey/pkg/cluster/add [no test files]
? github.com/kubesphere/kubekey/pkg/cluster/certs [no test files]
? github.com/kubesphere/kubekey/pkg/cluster/delete [no test files]
? github.com/kubesphere/kubekey/pkg/cluster/install [no test files]
ok github.com/kubesphere/kubekey/pkg/kubernetes/preinstall 0.006s coverage: 3.6% of statements
Thanks for pointing this issue. Would you like to help us to add a unit test framework and contribute to KubeKey? It would be much appreciated that you can work with us to complete it.