diff --git a/testdrive.sh b/testdrive.sh index 5a6e361ca7..ef884129eb 100755 --- a/testdrive.sh +++ b/testdrive.sh @@ -3,7 +3,7 @@ SUFFIX="$RANDOM" cleanup() { - docker stop "gitlab-${SUFFIX}" || kill -TERM "$(jobs -p)" || true + docker stop "gitlab-${SUFFIX}" || kill -TERM "$(jobs -pr)" || true docker stop "gitlab-redis-${SUFFIX}" || true docker stop "gitlab-postgresql-${SUFFIX}" || true } @@ -36,7 +36,7 @@ docker run --rm --name "gitlab-${SUFFIX}" \ "$IMAGE_NAME":"$TAG" & check() { - local url="http://localhost:10080" + local url="http://localhost:10081" status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null "$url") # Check if the status code is not in the success range (200-399) if [[ $status_code -lt 200 || $status_code -gt 399 ]]; then @@ -55,6 +55,6 @@ RETRIES="48" RETRIED=0 WAIT_TIME="5s" -until check || [[ "$((RETRIED++))" == "${RETRIES}" ]]; do +until check || { [[ "$((RETRIED++))" == "${RETRIES}" ]] && exit 1; } ; do sleep "${WAIT_TIME}" done