Removes test-cmd inappropriate dependency on kubectl

This commit is contained in:
Sean Sullivan
2019-06-27 10:46:24 -07:00
parent 6fe4119998
commit e851af0aab
3 changed files with 17 additions and 2 deletions

View File

@@ -438,7 +438,7 @@ run_pod_tests() {
kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:'
## Patch can modify a local object
kubectl patch --local -f pkg/kubectl/validation/testdata/v1/validPod.yaml --patch='{"spec": {"restartPolicy":"Never"}}' -o yaml | grep -q "Never"
kubectl patch --local -f test/fixtures/pkg/kubectl/cmd/patch/validPod.yaml --patch='{"spec": {"restartPolicy":"Never"}}' -o yaml | grep -q "Never"
## Patch fails with type restore error and exit code 1
output_message=$(! kubectl patch "${kube_flags[@]}" pod valid-pod -p='{"metadata":{"labels":"invalid"}}' 2>&1)