-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Get code coverage of several packages to 100% #4056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mixer/adapter/list/list.go
Outdated
@@ -31,6 +31,8 @@ import ( | |||
"sync" | |||
"time" | |||
|
|||
"regexp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a bin/fmt.sh
run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran bin/fmt.sh and a ton of formatting changes were done across the source base. Apparently, once again the linter presubmit check is no longer working :-(
Anyway, I fixed these specific issues, I'll fix the overall formatting in a distinct PR.
mixer/adapter/list/list_test.go
Outdated
b.SetAdapterConfig(cfg) | ||
|
||
err := b.Validate() | ||
if err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collapse with previous line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
return nil, err | ||
} | ||
// cannot fail, override syntax was checked in the Validate method | ||
exp, _ := regexp.Compile(override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really better code ? sometimes 100% coverage is worse than 99%
(like something isn't supposed to happen, until someone changes Validate and miss something and now it fails silently in production)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are tests to ensure Validate is doing the right thing.
Codecov Report
@@ Coverage Diff @@
## master #4056 +/- ##
=======================================
- Coverage 75% 75% -<1%
=======================================
Files 305 305
Lines 27514 27899 +385
=======================================
+ Hits 20550 20773 +223
- Misses 5657 5785 +128
- Partials 1307 1341 +34
Continue to review full report at Codecov.
|
PTAL. All test failures appear to be flakes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
my comments have been addressed.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: douglas-reid The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@geeknoid: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
No description provided.