mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 14:11:21 +00:00
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…
This commit is contained in:
parent
d57926c0b6
commit
73198870cd
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user