IZYR3KTL4M5OERLZM4LAC6N6TWZLQXMRVQIFOCIKMDQU3F2E7FHQC
IKC3UFA36INZDAY32H4RKD7WS6BISMC6OAFZZILGUGUHWRC6T4KAC
IGD6FZHDGCSDZE3TWT76SIACRFOU3VXUDIG7EBHUVIAPMSIVD56AC
SQVJAUORYHMLG56ZQ4C4QNS5V5PNQCNP5ITY7AC6VYJLEQBQACRAC
6K5PBUUN4GQAMOVX5BS6YYMHJ3PIF2PPZBTIEQ4R7BQNHC23GS3AC
YQWH4POV22KYCCKOTZXD36QKUOWEQ2DSPYPO5DNZDZ344RI25OAAC
T4LLYESZ2HUXSLKZ6GNBLVWUVG7R5IDFHYHYO773QIZ6QTOOXR2AC
LOHWNXEJKUPDI33VZMC2XLPXO7TZ2Y3AJTFJPJI2ZPHJOMLUUPRAC
3PNG7NIBQQURUUPRVQXYL342OT7JUUYOMY2JJNP6YDX7SYJDZMYAC
6CZHII3QFWOCQA5ELMIPKVOQSZMEHNCWQ3KNSKDQL5DTAGFSSZVQC
NIQ2WDFPQUBW5S5TY4M4YOOHNABPPDAPMUOFP5PIWMORNV7E5JTQC
7C6HSXUQ6HFILY35VPZWCJOVBAL7IJ2QXOU2X5DTIFJ6FQ2RHOQAC
4UBEIJRAPY5LXNYR55HRJYHBFZDS76STZPEM57X2GVHVT5GN6MFAC
Y2BFYLLKUGX3D6MKZXYMLPBPQFD4UGI4L3HK5ETYQBQVQCAQBIIQC
{
install = simpleTest {
machine =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql92;
environment.systemPackages = [ hydra ];
};
testScript =
''
$machine->waitForJob("postgresql");
let hydra = builtins.getAttr system build; in # build.${system}
simpleTest {
machine =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql92;
environment.systemPackages = [ hydra ];
};
# Initialise the database and the state.
$machine->mustSucceed
( "createdb -O root hydra",
, "psql hydra -f ${hydra}/libexec/hydra/sql/hydra-postgresql.sql"
, "mkdir /var/lib/hydra"
);
testScript =
''
$machine->waitForJob("postgresql");
# Start the web interface.
$machine->mustSucceed("HYDRA_DATA=/var/lib/hydra HYDRA_DBI='dbi:Pg:dbname=hydra;user=hydra;' hydra-server >&2 &");
$machine->waitForOpenPort("3000");
'';
};
};
# Initialise the database and the state.
$machine->mustSucceed
( "createdb -O root hydra",
, "psql hydra -f ${hydra}/libexec/hydra/sql/hydra-postgresql.sql"
, "mkdir /var/lib/hydra"
);