Merge pull request #308829 from r-ryantm/auto-update/qlog
[NixPkgs.git] / nixos / tests / postgis.nix
blobdacf4e576c071b00ca10228c218772cdafb14e5f
1 import ./make-test-python.nix ({ pkgs, ...} : {
2   name = "postgis";
3   meta = with pkgs.lib.maintainers; {
4     maintainers = [ lsix ];
5   };
7   nodes = {
8     master =
9       { pkgs, ... }:
11       {
12         services.postgresql = {
13             enable = true;
14             package = pkgs.postgresql;
15             extraPlugins = ps: with ps; [
16               postgis
17             ];
18         };
19       };
20   };
22   testScript = ''
23     start_all()
24     master.wait_for_unit("postgresql")
25     master.sleep(10)  # Hopefully this is long enough!!
26     master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'")
27     master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_raster;'")
28     master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'")
29   '';