-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 table tests for revision scaler (#1677) #1693
Conversation
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 for picking this up
wantState v1alpha1.RevisionServingStateType | ||
wantReplicas int | ||
}{ | ||
{"scales to zero", v1alpha1.RevisionServingStateActive, 1, 0, v1alpha1.RevisionServingStateReserve, 1}, |
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.
nit: I generally prefer the style of:
{{
label: "...",
startState: ...
}, {
label: "..."
...
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.
Sounds good, will update
@@ -146,6 +129,6 @@ func checkReplicas(t *testing.T, kubeClient kubernetes.Interface, deployment *v1 | |||
} | |||
|
|||
if *updatedDeployment.Spec.Replicas != int32(expectedScale) { | |||
t.Fatal("Unexpected deployment replicas.", updatedDeployment.Spec.Replicas) | |||
t.Fatal("Unexpected deployment replicas.", *updatedDeployment.Spec.Replicas) |
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.
Fatalf
?
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.
Do you mean, use Fatalf
to print a "want x, got y" style message, or use Fatalf
to not have to dereference the pointer?
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 just meant that seems more natural when passing args.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tanzeeb If they are not already assigned, you can assign the PR to them by writing 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 following is the coverage report on pkg/.
|
wantState v1alpha1.RevisionServingStateType | ||
wantReplicas int | ||
}{ | ||
{ |
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.
nit: if you use {{
style it'll drop a lot of indentation.
@tanzeeb do you want to get this updated and ping me on slack, so we can get this in? |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
91f630c
to
6a2b27c
Compare
I consent to the CLA |
6a2b27c
to
ce0e875
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, tanzeeb 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 |
Will merge manually after integration tests pass due to CLA issues. |
@tanzeeb thanks very much for doing this - the tests are so much cleaner now. |
Fixes #1677