nixpkgs/nixos/tests/postgis.nix
2018-10-30 14:33:35 +00:00

26 lines
638 B
Nix

import ./make-test.nix ({ pkgs, ...} : {
name = "postgis";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ lsix ];
};
nodes = {
master =
{ pkgs, ... }:
{
services.postgresql = let mypg = pkgs.postgresql_11; in {
enable = true;
package = mypg;
extraPlugins = [ (pkgs.postgis.override { postgresql = mypg; }) ];
};
};
};
testScript = ''
startAll;
$master->waitForUnit("postgresql");
$master->sleep(10); # Hopefully this is long enough!!
$master->succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'");
'';
})