Closed rudolf-chy closed 2 years ago
@Rudolf1998 , the current unit test coverage is only about 18.8% basing on your PR, which can not meet the 70% target, could you please optimize it to improve the ratio? thanks! $go test ./pkg/yurtappmanager/controller/yurtingress/... --covermode=count ok github.com/openyurtio/yurt-app-manager/pkg/yurtappmanager/controller/yurtingress (cached) coverage: 18.8% of statements
@Rudolf1998 , the current unit test coverage is only about 18.8% basing on your PR, which can not meet the 70% target, could you please optimize it to improve the ratio? thanks! $go test ./pkg/yurtappmanager/controller/yurtingress/... --covermode=count ok github.com/openyurtio/yurt-app-manager/pkg/yurtappmanager/controller/yurtingress (cached) coverage: 18.8% of statements
@zzguang I think 70% test coverage for the entire yurt-app-manager
repo is enough, and some unit tests will need mock tests, which we can implement uniformly later.
@Rudolf1998 , the current unit test coverage is only about 18.8% basing on your PR, which can not meet the 70% target, could you please optimize it to improve the ratio? thanks! $go test ./pkg/yurtappmanager/controller/yurtingress/... --covermode=count ok github.com/openyurtio/yurt-app-manager/pkg/yurtappmanager/controller/yurtingress (cached) coverage: 18.8% of statements
@zzguang I think 70% test coverage for the entire
yurt-app-manager
repo is enough, and some unit tests will need mock tests, which we can implement uniformly later.
Okay, agree with you to implement the mock test in future.
/approve
/lgtm
Merging #85 (12f13bc) into master (4fd0202) will increase coverage by
1.55%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #85 +/- ##
=========================================
+ Coverage 7.78% 9.34% +1.55%
=========================================
Files 17 18 +1
Lines 1901 2258 +357
=========================================
+ Hits 148 211 +63
- Misses 1724 2010 +286
- Partials 29 37 +8
Flag | Coverage Δ | |
---|---|---|
unittests | 9.34% <ø> (+1.55%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...r/controller/yurtingress/yurtingress_controller.go | 17.64% <0.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@Rudolf1998 please check ci/golangci-lint error info .
/lgtm
Fixes #76
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: kadisi, Rudolf1998, zzguang
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
other Note