mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 19:52:42 +00:00
Updated err message when retrieving resources by name with --all-namespaces.
This commit is contained in:
@@ -1548,9 +1548,9 @@ __EOF__
|
||||
# Clean up
|
||||
kubectl delete namespace my-namespace
|
||||
|
||||
##############
|
||||
######################
|
||||
# Pods in Namespaces #
|
||||
##############
|
||||
######################
|
||||
|
||||
### Create a new namespace
|
||||
# Pre-condition: the other namespace does not exist
|
||||
@@ -1569,6 +1569,9 @@ __EOF__
|
||||
kube::test::get_object_assert 'pods --namespace=other' "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:'
|
||||
# Post-condition: verify shorthand `-n other` has the same results as `--namespace=other`
|
||||
kube::test::get_object_assert 'pods -n other' "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:'
|
||||
# Post-condition: a resource cannot be retrieved by name across all namespaces
|
||||
output_message=$(! kubectl get "${kube_flags[@]}" pod valid-pod --all-namespaces 2>&1)
|
||||
kube::test::if_has_string "${output_message}" "a resource cannot be retrieved by name across all namespaces"
|
||||
|
||||
### Delete POD valid-pod in specific namespace
|
||||
# Pre-condition: valid-pod POD exists
|
||||
@@ -1580,9 +1583,9 @@ __EOF__
|
||||
# Clean up
|
||||
kubectl delete namespace other
|
||||
|
||||
##############
|
||||
###########
|
||||
# Secrets #
|
||||
##############
|
||||
###########
|
||||
|
||||
### Create a new namespace
|
||||
# Pre-condition: the test-secrets namespace does not exist
|
||||
|
Reference in New Issue
Block a user