-
Notifications
You must be signed in to change notification settings - Fork 889
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
Add UT for workstatus.go and taint.go and rule.go #3395
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3395 +/- ##
==========================================
+ Coverage 51.63% 53.70% +2.07%
==========================================
Files 210 210
Lines 18921 19077 +156
==========================================
+ Hits 9770 10246 +476
+ Misses 8620 8281 -339
- Partials 531 550 +19
Flags with carried forward coverage won't be shown. Click here to find out more. see 16 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
1afe0fe
to
20c963c
Compare
/assign |
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.
Thanks
@@ -357,3 +385,132 @@ func TestGetNoExecuteTaints(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func TestGetMinTolerationTime(t *testing.T) { |
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 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.
ok
pkg/util/helper/taint_test.go
Outdated
expected := true | ||
expectedTolerations := tolerations | ||
actual, actualTolerations := GetMatchingTolerations(taints, tolerations) | ||
if actual != expected { |
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.
Here can simply expected
to true.
In addition, can more test items be added to cover the test path?
Signed-off-by: rayywu <rayywu@tencent.com>
20c963c
to
4c66528
Compare
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.
Thanks~
/lgtm
Ask @RainbowMango to help rerun the test.
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Promote UT coverage
Which issue(s) this PR fixes:
Part of #3327
Does this PR introduce a user-facing change?:
NONE