summary refs log tree commit diff
path: root/nixos/tests/postgresql.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/postgresql.nix')
-rw-r--r--nixos/tests/postgresql.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix
index 1f4f43a2666..b5f4e1a4c14 100644
--- a/nixos/tests/postgresql.nix
+++ b/nixos/tests/postgresql.nix
@@ -14,7 +14,7 @@ let
     INSERT INTO sth (id) VALUES (1);
     INSERT INTO sth (id) VALUES (1);
   '';
-  make-postgresql-test = postgresql-name: postgresql-package: {
+  make-postgresql-test = postgresql-name: postgresql-package: makeTest {
     name = postgresql-name;
     meta = with pkgs.stdenv.lib.maintainers; {
       maintainers = [ zagy ];
@@ -24,6 +24,9 @@ let
       {
         services.postgresql.package=postgresql-package;
         services.postgresql.enable = true;
+        services.postgresql.initialScript = pkgs.writeText "init.sql" ''
+          CREATE USER root WITH SUPERUSER;
+        '';
       };
 
     testScript = ''