diff options
author | Raito Bezarius <masterancpp@gmail.com> | 2023-11-13 17:14:26 +0100 |
---|---|---|
committer | Raito Bezarius <masterancpp@gmail.com> | 2023-11-17 15:52:51 +0100 |
commit | 73198870cd8afe6f763b1d2e801b143d3015363e (patch) | |
tree | 2fb5f48f77ed5e538cdc30fb2ad5fb902a0395b5 /nixos/tests | |
parent | d57926c0b62f4cdbaf005f5410a5c795e063aff3 (diff) | |
download | nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.tar nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.tar.gz nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.tar.bz2 nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.tar.lz nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.tar.xz nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.tar.zst nixlib-73198870cd8afe6f763b1d2e801b143d3015363e.zip |
nixos/tests/pgbouncer: do not use `ensureDBOwnership`
pgbouncer test is special in the sense where it actually tries to connect via SCRAM SHA, let's avoid `ensureDBOwnership` here otherwise for some reason pgbouncer will try to look in pg_shadow for the authuser…
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/pgbouncer.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/tests/pgbouncer.nix b/nixos/tests/pgbouncer.nix index 814ca0d58865..bb5afd35ee28 100644 --- a/nixos/tests/pgbouncer.nix +++ b/nixos/tests/pgbouncer.nix @@ -17,18 +17,18 @@ in systemd.services.postgresql = { postStart = '' - ${pkgs.postgresql}/bin/psql -U postgres -c "ALTER ROLE testuser WITH LOGIN PASSWORD 'testpass'"; + ${pkgs.postgresql}/bin/psql -U postgres -c "ALTER ROLE testuser WITH LOGIN PASSWORD 'testpass'"; + ${pkgs.postgresql}/bin/psql -U postgres -c "ALTER DATABASE testdb OWNER TO testuser;"; ''; }; services = { postgresql = { enable = true; - ensureDatabases = [ "test" ]; + ensureDatabases = [ "testdb" ]; ensureUsers = [ { - name = "test"; - ensureDBOwnership = true; + name = "testuser"; }]; authentication = '' local testdb testuser scram-sha-256 @@ -38,7 +38,7 @@ in pgbouncer = { enable = true; listenAddress = "localhost"; - databases = { test = "host=/run/postgresql/ port=5432 auth_user=testuser dbname=test"; }; + databases = { test = "host=/run/postgresql/ port=5432 auth_user=testuser dbname=testdb"; }; authType = "scram-sha-256"; authFile = testAuthFile; }; |