APPS-261 Update the WORM test setup

This commit is contained in:
Cezar.Leahu
2020-08-20 21:58:28 +03:00
parent 606d21d2c1
commit dedae64839
2 changed files with 28 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export DOCKER_COMPOSE_PATH=$1
export DOCKER_COMPOSE_PATH="${1}"
if [ -z "$DOCKER_COMPOSE_PATH" ] ; then
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
@@ -23,3 +23,25 @@ else
echo "Docker Compose failed to start" >&2
exit 1
fi
WAIT_INTERVAL=1
COUNTER=0
TIMEOUT=300
t0=$(date +%s)
echo "Waiting for alfresco to start"
until $(curl --output /dev/null --silent --head --fail http://localhost:8080/alfresco) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
printf '.'
sleep ${WAIT_INTERVAL}
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
done
if (("$COUNTER" < "$TIMEOUT")) ; then
t1=$(date +%s)
delta=$(( ($t1 - $t0)/60 ))
echo "Alfresco Started in $delta minutes"
else
echo "Waited ${COUNTER} seconds"
echo "Alfresco Could not start in time."
exit 1
fi