Unverified Commit d595003e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #54449 from smarterclayton/get_with_options

Automatic merge from submit-queue (batch tested with PRs 54895, 54449). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update the get command to follow more conventions of commands Pure code movement, builds on top of #54446 and only the last commit is new. Will make refactoring get easier.
parents 9f1deac8 d27a5a44
...@@ -3752,13 +3752,13 @@ run_client_config_tests() { ...@@ -3752,13 +3752,13 @@ run_client_config_tests() {
# Pre-condition: context "missing-context" does not exist # Pre-condition: context "missing-context" does not exist
# Command # Command
output_message=$(! kubectl get pod --context="missing-context" 2>&1) output_message=$(! kubectl get pod --context="missing-context" 2>&1)
kube::test::if_has_string "${output_message}" 'context "missing-context" does not exist' kube::test::if_has_string "${output_message}" 'context was not found for specified context: missing-context'
# Post-condition: invalid or missing context returns error # Post-condition: invalid or missing context returns error
# Pre-condition: cluster "missing-cluster" does not exist # Pre-condition: cluster "missing-cluster" does not exist
# Command # Command
output_message=$(! kubectl get pod --cluster="missing-cluster" 2>&1) output_message=$(! kubectl get pod --cluster="missing-cluster" 2>&1)
kube::test::if_has_string "${output_message}" 'cluster "missing-cluster" does not exist' kube::test::if_has_string "${output_message}" 'no server found for cluster "missing-cluster"'
# Post-condition: invalid or missing cluster returns error # Post-condition: invalid or missing cluster returns error
# Pre-condition: user "missing-user" does not exist # Pre-condition: user "missing-user" does not exist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment