Fix drone
Fix service container host name Fix more hostnames Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
9e463c1f54
commit
6ec321ef23
15
autotest.sh
15
autotest.sh
|
@ -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 ..."
|
||||
|
@ -234,7 +234,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=mysqlmb4
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -296,6 +296,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
|
||||
|
|
Loading…
Reference in New Issue