-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
No need to assert an error when the error is not nil #111377
Conversation
@chendave: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/sig scheduling |
I am going to refactor the whole test file in another pr. |
/retest |
@@ -1129,6 +1153,15 @@ profiles: | |||
expectedError: `unknown field "foo"`, | |||
checkErrFn: runtime.IsStrictDecodingError, | |||
}, | |||
{ |
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.
Actually, we're going to mark v1beta2 as deprecated after #110534, so I was doubt about whether we need this any 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.
basically, this pr add some testcase for v1beta3, since it was on v1beta2 only, I think this should be okay.
since this has some conflict with #110534, I will come back to check this again after that one got merged. will revert to leave the fix on the nit only. |
Signed-off-by: Dave Chen <dave.chen@arm.com>
/retitle No need to assert an error when the error is not nil |
@kerthcet no conflict anymore. :) |
/retest |
/assign @damemi |
@@ -1163,7 +1163,7 @@ profiles: | |||
} | |||
return | |||
} | |||
assert.NoError(t, err) | |||
t.Errorf("unexpected error to create a config: %v", err) |
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 there a need to log anything here or are the checks above thorough enough?
for example, if the error here is expected, this message is misleading
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.
It shouldn't happen here, but if it does, we should emit the error.
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.
ah sorry, I misread the code, you are correct
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chendave, damemi 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 |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
What type of PR is this?
- Improve test coverage of scheduler options for v1beta3 API, Scheduler is now at v1beta3 while some of the testcases are only focus on v1beta2.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?
/kind cleanup
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: