test: negative pgrst_db_pool_available in metrics

Proves the failure on https://github.com/PostgREST/postgrest/issues/4622.

This doesn't require additional test infra, only nginx. Taking advantage
of the `stream {}` context which is also compatible with unix socket
besides TCP.
This commit is contained in:
steve-chavez
2026-05-20 10:29:12 -05:00
committed by Steve Chavez
parent ae1e3d6c4d
commit 0be41a4941
5 changed files with 90 additions and 1 deletions
+3
View File
@@ -10,6 +10,7 @@
, hostPlatform
, jq
, lib
, nginx
, postgrest
, python3
, runtimeShell
@@ -94,6 +95,7 @@ let
args = [ "ARG_LEFTOVERS([pytest arguments])" ];
workingDir = "/";
withEnv = postgrest.env;
withPath = [ nginx ];
}
''
${cabal-install}/bin/cabal v2-build ${devCabalOptions} exe:postgrest
@@ -156,6 +158,7 @@ let
redirectTixFiles = false;
withEnv = postgrest.env;
withTmpDir = true;
withPath = [ nginx ];
}
(
# required for `hpc markup` in CI; glibcLocales is not available e.g. on Darwin