-
Notifications
You must be signed in to change notification settings - Fork 263
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 support for -A variant of --all-namespaces #356
Conversation
-A is my newest favorite kubectl flag, it's so much easier/faster to type than --all-namespaces. kn users should benefit from it too! Signed-off-by: Doug Davis <[email protected]>
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.
@duglin: 0 warnings.
In response to this:
-A is my newest favorite kubectl flag, it's so much easier/faster to type
than --all-namespaces. kn users should benefit from it too!Signed-off-by: Doug Davis [email protected]
/lintRelease Note
The kubectl `-A` variant of the `--all-namespaces` flag is now supported.
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.
pkg/kn/commands/namespaced_test.go
Outdated
@@ -95,6 +107,18 @@ func TestGetNamespaceDefaultAllNamespacesUnset(t *testing.T) { | |||
if actualNamespace != expectedNamespace { | |||
t.Fatalf("Incorrect namespace retrieved: %v, expected: %v", actualNamespace, expectedNamespace) | |||
} | |||
|
|||
// Now do it again using -A instead | |||
testCmd.SetArgs([]string{"-A"}) |
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.
Could we make those tests in a loop like in
for _, arg := range []string { "--all-namespaces", "-A" } {
....
}
This would avoid copy & paste code. Same for the other test.
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.
sure
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.
done
Signed-off-by: Doug Davis <[email protected]>
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-to-test
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: duglin, rhuss 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 |
@duglin: The following test 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. |
* Also update E2E test return value on failures Don't rely on "failed" being the default/current state. Bonus: factor out the return code workaround in a separate function. * Document function
…ive#356) - First run serving e2e specific tests - teardown - Setup eventing nightly and run eventing e2e specific tests
-A is my newest favorite kubectl flag, it's so much easier/faster to type
than --all-namespaces. kn users should benefit from it too!
Signed-off-by: Doug Davis [email protected]
/lint
Release Note