-
Notifications
You must be signed in to change notification settings - Fork 18
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 autoscaling list command #17
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.
@chaozbj it's good to add at least one e2e test case for autoscaling list
in test/e2e/kn_admin_test.go
, thanks!
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 comments. Also need e2e tests. These are the best :)
Otherwise LGTM
currentCm := &corev1.ConfigMap{} | ||
currentCm, err := p.ClientSet.CoreV1().ConfigMaps(knativeServing).Get(configAutoscaler, metav1.GetOptions{}) | ||
if err != nil { | ||
return fmt.Errorf("failed to get ConfigMaps: %+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.
I wonder if putting the error message here will be useful to user?
func TestAutoscalingListEmpty(t *testing.T) { | ||
t.Run("no flags", func(t *testing.T) { | ||
cm := &corev1.ConfigMap{ | ||
ObjectMeta: metav1.ObjectMeta{ |
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.
Maybe when it’s empty the result should be “No autoscaling info available” or similar instead of a list with headers...
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 @maximilien, I will improve the output for empty configs.
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.
@maximilien and @zhanggbj Thanks, for e2e test case, yes, I missed it, I will add, but I saw @zhanggbj added the test function for autoscaling func (et *e2eTest) knAdminAutoscaling(t *testing.T, r *test.KnRunResultCollector)
in her RP #16 , I think I should wait the PR to deliver first and then modify the same function to add tests for list
command or I can add it later.
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.
/hold |
/unhold |
@zhanggbj @maximilien Changes as below:
Please help me to review, thanks! |
@chaozbj Thanks Chao for the efforts! In general, the changes look good to me, For 1) Let's finish the dependency bump firstly in PR #21, we need it to build release 0.1.0, this will also resolve the issue you mentioned. For 5) I think |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chaozbj, maximilien, zhanggbj 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 |
/lgtm |
Prow tests are failing due to test-infra setting in progress which is covered by #24
|
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.
Tests still failing
/retest
/test all |
/retest |
/lgtm cancel @chaozbj would you please help to rebase first. Just merged Navid's PR for test infra. |
Signed-off-by: chaozbj <[email protected]>
Signed-off-by: chaozbj <[email protected]>
Signed-off-by: chaozbj <[email protected]>
Signed-off-by: chaozbj <[email protected]>
Signed-off-by: chaozbj <[email protected]>
/retest |
1 similar comment
/retest |
@chaozbj : there is a verify codegen step now part of the build tests,
please run |
Signed-off-by: chaozbj <[email protected]>
@chaozbj: The following tests failed, say
Full PR test history. Your PR dashboard. 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. |
close it and will create a new PR for |
The issue is: #15
here is an example of output: