Fix drone

Fix service container host name
check current folder
Fix more hostnames

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-07-14 09:03:14 +02:00
parent e674ace72d
commit 103b2f14f9
1 changed files with 12 additions and 1 deletions

View File

@ -200,7 +200,7 @@ function execute_tests {
fi
mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
else
DATABASEHOST=127.0.0.1
DATABASEHOST=mysql
fi
fi
echo "Waiting for MySQL initialisation ..."
@ -254,6 +254,17 @@ function execute_tests {
echo "Postgres is up."
else
if [ ! -z "$DRONE" ] ; then
DATABASEHOST=postgres
fi
echo "Waiting for Postgres to be available ..."
if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 5432 60; then
echo "[ERROR] Waited 60 seconds, no response" >&2
exit 1
fi
echo "Give it 10 additional seconds ..."
sleep 10
if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
fi