Merge pull request #107003 from julianvmodesto/dry-run-values
Re-introduce removed kubectl --dry-run values.
This commit is contained in:
@@ -101,6 +101,7 @@ run_kubectl_apply_tests() {
|
||||
kube::test::get_object_assert pods "{{range.items}}{{${id_field:?}}}:{{end}}" ''
|
||||
|
||||
# apply dry-run
|
||||
kubectl apply --dry-run=true -f hack/testdata/pod.yaml "${kube_flags[@]:?}"
|
||||
kubectl apply --dry-run=client -f hack/testdata/pod.yaml "${kube_flags[@]:?}"
|
||||
kubectl apply --dry-run=server -f hack/testdata/pod.yaml "${kube_flags[@]:?}"
|
||||
# No pod exists
|
||||
|
@@ -49,7 +49,7 @@ run_job_tests() {
|
||||
kube::test::describe_resource_chunk_size_assert cronjobs events "--namespace=test-jobs"
|
||||
|
||||
### Create a job in dry-run mode
|
||||
output_message=$(kubectl create job test-job --from=cronjob/pi --dry-run=client --namespace=test-jobs -o name)
|
||||
output_message=$(kubectl create job test-job --from=cronjob/pi --dry-run=true --namespace=test-jobs -o name)
|
||||
# Post-condition: The text 'job.batch/test-job' should be part of the output
|
||||
kube::test::if_has_string "${output_message}" 'job.batch/test-job'
|
||||
# Post-condition: The test-job wasn't created actually
|
||||
|
Reference in New Issue
Block a user