-
Notifications
You must be signed in to change notification settings - Fork 902
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
Added tests for cmd/scheduler #5459
Added tests for cmd/scheduler #5459
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5459 +/- ##
==========================================
+ Coverage 31.14% 31.72% +0.58%
==========================================
Files 640 643 +3
Lines 44417 44432 +15
==========================================
+ Hits 13832 14097 +265
+ Misses 29583 29306 -277
- Partials 1002 1029 +27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@XiShanYongYe-Chang I implemented tests for options.go in this PR. If this is valid, then i could add something similar for cmd/descheduler/app/options/options.go. I'll squash the commits if it is valid or i'll drop it. |
@XiShanYongYe-Chang I didn't got what you meant by eyes emoji? |
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestNewOptions(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.
This test may be meaningless.
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 could add it in TestAddFlags or remove it. But It can serve as a form of documentation stating the expected default values and it can catch unintended changes to default values in future code modifications.
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.
@XiShanYongYe-Chang PTAL
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, can you help squash the commits?
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, can you help squash the commits?
DONE.
What I'm trying to say is that I'm reviewing. Maybe it's not enough, but there's a little bit less to choose from. |
Okay, i'll make the changes once you complete review. |
Signed-off-by: Anuj Agrawal <[email protected]> Added tests for cmd/scheduler Signed-off-by: Anuj Agrawal <[email protected]>
c16d45e
to
b64a76c
Compare
@XiShanYongYe-Chang I created a similar test file for cmd/descheduler/app/options/options.go . Should i make a push it? |
Let's wait until this pr is integrated. |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang 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 |
Description:
This PR introduces tests for cmd/scheduler/app/scheduler.go and cmd/scheduler/app/options/options.go .
What type of PR is this?
/kind failing-test
/kind feature
What this PR does / why we need it:
This PR adds comprehensive tests for testing core functionality of cmd/scheduler .
Which issue(s) this PR fixes:
Fixes a part of #5236
Special notes for your reviewer:
The additions in this PR are similar to implemented in #5445 .
Does this PR introduce a user-facing change?: