knative / client-contrib

Community contributed `kn` plugins.
Apache License 2.0
10 stars 23 forks source link

[kn-admin] Add Unit Test and e2e test #14

Open zhanggbj opened 4 years ago

zhanggbj commented 4 years ago

For kn-admin plugin, use go test framework to fill up Unit Test and e2e test.

zhanggbj commented 4 years ago

UT merged with #14 by @lanceliuu Xu, any plan for e2e?

xliuxu commented 4 years ago

Progress for adding unit test & e2e test: The unit tests part is done in PR https://github.com/knative/client-contrib/pull/31

?       knative.dev/client-contrib/plugins/admin/cmd    [no test files]
ok      knative.dev/client-contrib/plugins/admin/core   4.482s  coverage: 50.0% of statements
?       knative.dev/client-contrib/plugins/admin/pkg    [no test files]
ok      knative.dev/client-contrib/plugins/admin/pkg/command    1.203s  coverage: 100.0% of statements
ok      knative.dev/client-contrib/plugins/admin/pkg/command/domain     2.188s  coverage: 97.7% of statements
ok      knative.dev/client-contrib/plugins/admin/pkg/command/registry   4.872s  coverage: 94.9% of statements
?       knative.dev/client-contrib/plugins/admin/pkg/testutil   [no test files]

I will continue to add e2e tests in another pull request.

zhanggbj commented 4 years ago

e2e which need to fill up Autoscaling

Domain

Registry