Update Travis test

This commit is contained in:
Semen Bezrukov 2019-10-23 16:05:43 +03:00
parent 4b9db5b83b
commit 166d218a15

21
test.sh
View file

@ -9,21 +9,12 @@ fi
# Run test environment # Run test environment
docker-compose -p ds -f $file up -d docker-compose -p ds -f $file up -d
wakeup_attempts=30 wakeup_timeout=30
wakeup_timeout=5
for ((i=0; i<$wakeup_attempts; i++)) # Get documentserver healthcheck status
do echo "Wait for service wake up"
# Get documentserver healthcheck status sleep $wakeup_timeout
healthcheck_res=$(wget --no-check-certificate -qO - localhost/healthcheck) 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
# Fail if it isn't true # Fail if it isn't true
if [[ $healthcheck_res == "true" ]]; then if [[ $healthcheck_res == "true" ]]; then
@ -33,4 +24,4 @@ else
exit 1 exit 1
fi fi
docker-compose -p ds -f $file down docker-compose -p ds -f $file down