Wire --filename flag to exec

This commit is contained in:
Maciej Szulik
2020-02-24 14:35:37 +01:00
parent 39ed64ec4c
commit 9dac1699bf
3 changed files with 34 additions and 23 deletions

View File

@@ -81,14 +81,14 @@ run_kubectl_exec_resource_name_tests() {
# POD test-pod is exists this is shouldn't have output not found
kube::test::if_has_not_string "${output_message}" 'not found'
# These must be pass the validate
kube::test::if_has_not_string "${output_message}" 'pod or type/name must be specified'
kube::test::if_has_not_string "${output_message}" 'pod, type/name or --filename must be specified'
output_message=$(! kubectl exec replicaset/frontend date 2>&1)
# Replicaset frontend is valid and exists will select the first pod.
# and Shouldn't have output not found
kube::test::if_has_not_string "${output_message}" 'not found'
# These must be pass the validate
kube::test::if_has_not_string "${output_message}" 'pod or type/name must be specified'
kube::test::if_has_not_string "${output_message}" 'pod, type/name or --filename must be specified'
# Clean up
kubectl delete pods/test-pod