My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/nixos/tests/postgis.nix

29 lines
721 B

import ./make-test-python.nix ({ pkgs, ...} : {
name = "postgis";
meta = with pkgs.lib.maintainers; {
maintainers = [ lsix ];
};
nodes = {
master =
{ pkgs, ... }:
{
services.postgresql = let mypg = pkgs.postgresql_11; in {
enable = true;
package = mypg;
extraPlugins = with mypg.pkgs; [
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_topology;'")
'';
})