Fix shellcheck failures SC2251

https://github.com/koalaman/shellcheck/wiki/SC2251

This may be masking some test failures.

We have a bunch of test code like this:

set -o errexit
[...]
! kubectl get pod wrong-pod
[...]

This test will succeed no matter what the result (return code) of kubectl is.
This commit is contained in:
Odin Ugedal
2019-10-23 21:26:02 +02:00
parent d467b8ea14
commit 6a73c0899a
7 changed files with 35 additions and 35 deletions

View File

@@ -50,7 +50,7 @@ run_kubectl_create_error_tests() {
kube::log::status "Testing kubectl create with error"
# Passing no arguments to create is an error
! kubectl create
! kubectl create || exit 1
## kubectl create should not panic on empty string lists in a template
ERROR_FILE="${KUBE_TEMP}/validation-error"