Docker-DocumentServer/tests/test.sh
Semyon Bezrukov ab5637a11f Update travis tests (#243)
* Remove docker .env file

* Add enviroment variables defaults

* Update docker-compose version

* Update travis tests variables

* Build document server image

* Fix mariadb

* Fix variable names

* Revert container name

(cherry picked from commit e721ca102d0b75b0f01099c2b9c10d73db140250)
2020-04-28 15:23:27 +03:00

28 lines
547 B
Bash
Executable File

#!/bin/bash
# Check if the yml exists
if [[ ! -f $config ]]; then
echo "File $config doesn't exist!"
exit 1
fi
# Run test environment
docker-compose -p ds -f $config up -d
wakeup_timeout=30
# 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
echo "Healthcheck passed."
else
echo "Healthcheck failed!"
exit 1
fi
docker-compose -p ds -f $config down