Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-09 01:57:49 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-05-09 01:57:49 +0300
commite696b922971be68838ce7661a0050b48f6665915 (patch)
tree4c3aef40b417849a134283e3de673403de17265f /autotest.sh
parent9d8e9b1efbc210319ce467927085405a7219a2c2 (diff)
Wait for Postgres to be available
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/autotest.sh b/autotest.sh
index fa15597bd55..b9058efdbc6 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -306,6 +306,12 @@ function execute_tests {
echo "Postgres is up."
else
+ 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
+
if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
fi