-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
use subtest for table units (pkg/scheduler/algorithm/predicates) #63660
use subtest for table units (pkg/scheduler/algorithm/predicates) #63660
Conversation
} | ||
} | ||
|
||
func TestNodeConditionPredicate(t *testing.T) { | ||
tests := []struct { | ||
tests := map[string]struct { |
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.
Comment from original PR: I don't think this should be a map.
node: &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node1"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}, | ||
schedulable: true, | ||
}, | ||
// node2 ignored - node not Ready | ||
{ | ||
"node2 ignored - node not Ready": { |
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.
the '-' in these test names could be changed to a '/'
if fits != test.Fits { | ||
t.Errorf("%s: expected %v got %v", test.Name, test.Fits, fits) | ||
} | ||
t.Run(test.Name, func(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.
lowercase Name for consistency?
/ok-to-test |
ce03bbd
to
48eebeb
Compare
/test pull-kubernetes-e2e-kops-aws |
/assign @bsalamat |
48eebeb
to
8b37590
Compare
/assign @misterikkit |
apply subtest to predicates
8b37590
to
8bbf182
Compare
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
/lgtm |
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
Thanks, @xchapter7x!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, misterikkit, xchapter7x 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 |
/retest Review the full test history for this PR. Silence the bot with an |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 64285, 63660, 63661, 63662, 64883). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it: Update scheduler's unit table tests to use subtest
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Special notes for your reviewer:
breaks up PR: #63281
/ref #63267
Release note: