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:
authorVincent Petry <vincent@nextcloud.com>2021-07-02 16:26:06 +0300
committerVincent Petry <vincent@nextcloud.com>2021-07-02 16:26:06 +0300
commit526d36c290c829eda005d6a643648e0769547753 (patch)
tree3a42c5f96e14963d98df1b4dfe3585482e768134 /autotest.sh
parent129214e430865836dad57b271f49e63412d5c842 (diff)
Add connection check in autotest.sh for pgsql docker
When using pgsql docker for testing locally with autotest, make sure to properly wait for the port to be available. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/autotest.sh b/autotest.sh
index 7214df18b14..cf166a79186 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -309,8 +309,10 @@ function execute_tests {
echo "Waiting for Postgres initialisation ..."
- # grep exits on the first match and then the script continues
- docker logs -f "$DOCKER_CONTAINER_ID" 2>&1 | grep -q "database system is ready to accept connections"
+ if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 5432 60; then
+ echo "[ERROR] Waited 60 seconds for $DATABASEHOST, no response" >&2
+ exit 1
+ fi
echo "Postgres is up."
else