diff options
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/initdb.nix | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/nixos/tests/initdb.nix b/nixos/tests/initdb.nix index 749d7857a13..e7c83dc4002 100644 --- a/nixos/tests/initdb.nix +++ b/nixos/tests/initdb.nix @@ -1,26 +1,19 @@ -let - pkgs = import <nixpkgs> { }; -in -with import <nixpkgs/nixos/lib/testing.nix> { inherit pkgs; system = builtins.currentSystem; }; -with pkgs.lib; +import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: { + name = "pg-initdb"; -makeTest { - name = "pg-initdb"; + machine = {...}: + { + documentation.enable = false; + services.postgresql.enable = true; + services.postgresql.package = pkgs.postgresql_9_6; + environment.pathsToLink = [ + "/share/postgresql" + ]; + }; - machine = {...}: - { - documentation.enable = false; - services.postgresql.enable = true; - services.postgresql.package = pkgs.postgresql_9_6; - environment.pathsToLink = [ - "/share/postgresql" - ]; - }; - - testScript = '' - $machine->start; - $machine->succeed("sudo -u postgres initdb -D /tmp/testpostgres2"); - $machine->shutdown; - ''; - - } \ No newline at end of file + testScript = '' + machine.start() + machine.succeed("sudo -u postgres initdb -D /tmp/testpostgres2") + machine.shutdown() + ''; +}) |