diff --git a/test-kube.sh b/test-kube.sh index 992e4d6..779c12c 100755 --- a/test-kube.sh +++ b/test-kube.sh @@ -32,15 +32,15 @@ endtoend() { shift 3 set -x # shellcheck disable=SC2015 - if { - curl -ikLsS --noproxy "*" -o "$TMP2" "$@" \ + if + ! curl -ikLsS --noproxy "*" -o "$TMP2" "$@" \ --connect-to "$DOMAIN:80:127.0.0.1:8080" \ --connect-to "$DOMAIN:443:127.0.0.1:8443" \ "http://$DOMAIN/$PAGE" || # ignore max redir error - [ $? = 47 ] - } && - grep -Fq "$RESULT" "$TMP2"; then + [ $? != 47 ] || + ! grep -Fq "$RESULT" "$TMP2" + then echo "# -> failed:" cat "$TMP2" return 1