瀏覽代碼

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>
tags/v23.0.0beta1
Vincent Petry 2 年之前
父節點
當前提交
526d36c290
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    2
      autotest.sh

+ 4
- 2
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

Loading…
取消
儲存