diff --git a/tests/kuttl/common/assert-sample-deployment.yaml b/tests/kuttl/common/assert-sample-deployment.yaml index dbd5d8c2..ea0a0ea1 100644 --- a/tests/kuttl/common/assert-sample-deployment.yaml +++ b/tests/kuttl/common/assert-sample-deployment.yaml @@ -19,8 +19,8 @@ commands: set -x RETURN_CODE=0 PUBLIC_URL=$(oc get -n $NAMESPACE horizon horizon -o jsonpath='{.status.endpoint}') - STATUSCODE=$(oc exec -it deployment/horizon -- curl --silent --output /dev/stderr --head --write-out "%{http_code}" "$PUBLIC_URL/dashboard/auth/login/?next=/dashboard/" -k) - if test $STATUSCODE -ne 200; then + STATUSCODE=$(oc -n $NAMESPACE exec -it deployment/horizon -- curl --silent --output /dev/stderr --head --write-out "%{http_code}" "$PUBLIC_URL/dashboard/auth/login/?next=/dashboard/" -k) + if [ -z ${STATUSCODE} ] || test $STATUSCODE -ne 200; then RETURN_CODE=1 echo "${PUBLIC_URL} status code expected is 200 but was ${STATUSCODE}" fi