diff options
author | Jacek Galowicz <jacek.galowicz@cyberus-technology.de> | 2020-01-07 20:52:24 +0100 |
---|---|---|
committer | Jacek Galowicz <jacek.galowicz@cyberus-technology.de> | 2020-01-07 20:52:24 +0100 |
commit | c44331dd5d5d54db20b941bb8c04dcf8f143648b (patch) | |
tree | bcd128099b21c031ea0848bdedb5326011edcef0 /nixos | |
parent | c0b70f0e35542b5d7e4ce3ebdd894b8aebc12228 (diff) | |
download | nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.tar nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.tar.gz nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.tar.bz2 nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.tar.lz nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.tar.xz nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.tar.zst nixpkgs-c44331dd5d5d54db20b941bb8c04dcf8f143648b.zip |
nixosTests.initdb: port to python
Diffstat (limited to 'nixos')
-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() + ''; +}) |