fix trivial shell quoting issues surfaced by shellcheck v0.7.1
This commit is contained in:
@@ -560,7 +560,7 @@ run_pod_tests() {
|
||||
resourceVersion=$(kubectl get "${kube_flags[@]}" pod valid-pod -o go-template='{{ .metadata.resourceVersion }}')
|
||||
((resourceVersion+=100))
|
||||
# Command
|
||||
kubectl patch "${kube_flags[@]}" pod valid-pod -p='{"spec":{"containers":[{"name": "kubernetes-serve-hostname", "image": "nginx"}]},"metadata":{"resourceVersion":"'$resourceVersion'"}}' 2> "${ERROR_FILE}" || true
|
||||
kubectl patch "${kube_flags[@]}" pod valid-pod -p='{"spec":{"containers":[{"name": "kubernetes-serve-hostname", "image": "nginx"}]},"metadata":{"resourceVersion":"'"$resourceVersion"'"}}' 2> "${ERROR_FILE}" || true
|
||||
# Post-condition: should get an error reporting the conflict
|
||||
if grep -q "please apply your changes to the latest version and try again" "${ERROR_FILE}"; then
|
||||
kube::log::status "\"kubectl patch with resourceVersion $resourceVersion\" returns error as expected: $(cat "${ERROR_FILE}")"
|
||||
|
Reference in New Issue
Block a user