Update Travis test
This commit is contained in:
parent
4b9db5b83b
commit
166d218a15
21
test.sh
21
test.sh
|
|
@ -9,21 +9,12 @@ fi
|
|||
# Run test environment
|
||||
docker-compose -p ds -f $file up -d
|
||||
|
||||
wakeup_attempts=30
|
||||
wakeup_timeout=5
|
||||
wakeup_timeout=30
|
||||
|
||||
for ((i=0; i<$wakeup_attempts; i++))
|
||||
do
|
||||
# Get documentserver healthcheck status
|
||||
healthcheck_res=$(wget --no-check-certificate -qO - localhost/healthcheck)
|
||||
|
||||
if [[ $healthcheck_res == "true" ]]; then
|
||||
break
|
||||
else
|
||||
echo "Wait for service wake up #$i"
|
||||
sleep $wakeup_timeout
|
||||
fi
|
||||
done
|
||||
# Get documentserver healthcheck status
|
||||
echo "Wait for service wake up"
|
||||
sleep $wakeup_timeout
|
||||
healthcheck_res=$(wget --no-check-certificate -qO - localhost/healthcheck)
|
||||
|
||||
# Fail if it isn't true
|
||||
if [[ $healthcheck_res == "true" ]]; then
|
||||
|
|
@ -33,4 +24,4 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
docker-compose -p ds -f $file down
|
||||
docker-compose -p ds -f $file down
|
||||
|
|
|
|||
Loading…
Reference in a new issue