Skip to content

Commit 44c79c2

Browse files
committed
add initialScript to pg-safeupdate test for user creation
1 parent ea2bb42 commit 44c79c2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

nix/ext/tests/pg_safeupdate.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ self.inputs.nixpkgs.lib.nixos.runTest {
5454
enable = true;
5555
package = (postgresqlWithExtension psql_15);
5656
settings = (installedExtension "15").defaultSettings or { };
57+
initialScript = pkgs.writeText "init-postgres" ''
58+
CREATE ROLE authenticated NOLOGIN NOINHERIT;
59+
GRANT USAGE ON SCHEMA public TO authenticated;
60+
CREATE ROLE anon NOLOGIN NOINHERIT;
61+
GRANT USAGE ON SCHEMA public TO anon;
62+
'';
5763
};
5864

5965
specialisation.postgresql17.configuration = {

0 commit comments

Comments
 (0)