-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Vpa - Component status #2742
Vpa - Component status #2742
Conversation
/assign @bskiba |
Vendor update moved to #2743 |
8b0322a
to
6d94edf
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.
I don't wan't to encourage large pull requests, but I feel like I'm kinda missing context reviewing an unused class.
Please rebase to master once #2743 merges
6d94edf
to
c74013c
Compare
e1132a0
to
ae0e75b
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.
Couple more comments.
Thanks for adding comprehensive set of tests for this 👍
return true, nil, fmt.Errorf("unsupported action") | ||
} | ||
}(), | ||
wantErr: false, |
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.
No case with wantErr = true?
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.
Test case added.
} | ||
for _, tc := range tests { | ||
t.Run(fmt.Sprintf("test case: %s", tc.name), func(t *testing.T) { | ||
assert.Equal(t, IsStatusValid(tc.lease, tc.leaseTimeout), tc.want) |
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.
Please add a message for failed equality check, otherwise we get "expected: false got: true" only on test failure
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've updated test names to be more self-explanatory. Imho simple "expected, got" is enough.
ae0e75b
to
208d937
Compare
/hold cancel |
One more comment to the tests |
8ae0ccd
to
26c3320
Compare
26c3320
to
6b5e8bd
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bskiba 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 |
Adding component status implementation based on Leases.