1 import ./make-test-python.nix ({ pkgs, ... } :
9 meta = with pkgs.lib.maintainers; {
10 maintainers = [ basvandijk ];
13 one = { config, pkgs, ... }: {
17 initialScript = pkgs.writeText "pg-init-script" ''
18 CREATE ROLE ${role} SUPERUSER LOGIN PASSWORD '${password}';
24 ${conn} = "hostaddr=127.0.0.1 port=${toString config.services.postgresql.settings.port} dbname=postgres";
33 one.wait_for_unit("default.target")
34 one.require_unit_state("pgmanage.service", "active")
36 # Test if we can log in.
37 one.wait_until_succeeds(
38 "curl 'http://localhost:8080/pgmanage/auth' --data 'action=login&connname=${conn}&username=${role}&password=${password}' --fail"