Skip to content

Commit

Permalink
Stash commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed Dec 22, 2022
1 parent 063fae9 commit 3ced4fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
environment:
- MAIN_VHOST_BACKEND=conf:rproxy:http:python:3000
- MAIN_VHOST_SSL_TYPE=both
- DEBUG_ENTRYPOINT=4
ports:
- "8000:80"
- "8443:443"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,39 @@ while_retry() {
local output

count=0
retry=60
retry=1200
printf "[TESTING] %s" "curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\" "
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
printf "."
if [ "${count}" = "${retry}" ]; then
printf "\\n"
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
return 1
fi
count=$(( count + 1 ))
sleep 1
done
printf "\\n"
echo "${output}"
}

docker-compose build
docker-compose up -d

if ! output1="$( while_retry '[OK]' "http://localhost:8000" )"; then
if ! while_retry '[OK]' "http://localhost:8000"; then
docker-compose logs || true
docker-compose stop || true
docker-compose rm -f || true
echo "${output1}"
exit 1
fi

if ! output2="$( while_retry '[OK]' "https://localhost:8443" )"; then
if ! while_retry '[OK]' "https://localhost:8443"; then
docker-compose logs || true
docker-compose stop || true
docker-compose rm -f || true
echo "${output2}"
exit 1
fi
docker-compose logs || true
docker-compose stop || true
docker-compose rm -f || true

echo "${output1}"
echo "${output2}"

0 comments on commit 3ced4fc

Please sign in to comment.