From 74222a000798ff15e1dd4f75e5c0516d5e32e74e Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Tue, 18 Mar 2025 17:26:20 +0100 Subject: [PATCH] smoke test postgres connection --- .azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 720ac3e..0a4aab3 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -17,3 +17,7 @@ steps: echo "POSTGRES_DATABASE=${BUILD_SOURCEBRANCH#refs/heads/}" >> .env set -a && source .env && set +a displayName: 'Load env' + +- script: | + psql -h $POSTGRES_HOST -U $POSTGRES_USER -d postgres -c "SELECT 1 FROM pg_database WHERE datname = 'postgres';" + displayName: 'Smoke test Postgres connection' \ No newline at end of file