-
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
Add test items for job utils #49829
Add test items for job utils #49829
Conversation
Hi @zhangxiaoyu-zidif. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. I understand the commands that are listed here. |
/ok-to-test |
/test pull-kubernetes-e2e-kops-aws |
pkg/controller/job/utils_test.go
Outdated
job.Status.Conditions[0].Status = v1.ConditionUnknown | ||
if IsJobFinished(job) { | ||
t.Error("Job was not expected to be finished") | ||
} |
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 a lot for the patch. Would you make these tests table-driven while you're at it?
Hi, @janetkuo |
/test pull-kubernetes-e2e-kops-aws |
pkg/controller/job/utils_test.go
Outdated
testCases := map[string]struct { | ||
conditionType batch.JobConditionType | ||
conditionStatus v1.ConditionStatus | ||
expect bool |
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'm not sure what expect
means? Would you name it expectJobFinished
, and then return error if expectJobFinished != IsJobFinished
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,thanks~
@janetkuo |
/retest |
/test pull-kubernetes-e2e-kops-aws |
1 similar comment
/test pull-kubernetes-e2e-kops-aws |
/lgtm |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: janetkuo, zhangxiaoyu-zidif Associated issue requirement bypassed by: janetkuo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938) |
What this PR does / why we need it:
Add test item for job util
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
NONE
Release note: