diff options
Diffstat (limited to 'nixpkgs/nixos/tests/postgis.nix')
-rw-r--r-- | nixpkgs/nixos/tests/postgis.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/postgis.nix b/nixpkgs/nixos/tests/postgis.nix new file mode 100644 index 000000000000..dacf4e576c07 --- /dev/null +++ b/nixpkgs/nixos/tests/postgis.nix @@ -0,0 +1,30 @@ +import ./make-test-python.nix ({ pkgs, ...} : { + name = "postgis"; + meta = with pkgs.lib.maintainers; { + maintainers = [ lsix ]; + }; + + nodes = { + master = + { pkgs, ... }: + + { + services.postgresql = { + enable = true; + package = pkgs.postgresql; + extraPlugins = ps: with ps; [ + postgis + ]; + }; + }; + }; + + testScript = '' + start_all() + master.wait_for_unit("postgresql") + master.sleep(10) # Hopefully this is long enough!! + master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'") + master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_raster;'") + master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'") + ''; +}) |