2 system ? builtins.currentSystem,
4 pkgs ? import ../../.. { inherit system config; },
7 with import ../../lib/testing-python.nix { inherit system pkgs; };
12 inherit (import ./common.nix { inherit system; }) baseConfig;
22 name = "hydra-${name}";
23 meta = with pkgs.lib.maintainers; {
24 maintainers = [ lewo ];
30 imports = [ baseConfig ];
31 services.hydra = { inherit package; };
35 # let the system boot up
36 machine.wait_for_unit("multi-user.target")
37 # test whether the database is running
38 machine.wait_for_unit("postgresql.service")
39 # test whether the actual hydra daemons are running
40 machine.wait_for_unit("hydra-init.service")
41 machine.require_unit_state("hydra-queue-runner.service")
42 machine.require_unit_state("hydra-evaluator.service")
43 machine.require_unit_state("hydra-notify.service")
45 machine.succeed("hydra-create-user admin --role admin --password admin")
47 # create a project with a trivial job
48 machine.wait_for_open_port(3000)
50 # make sure the build as been successfully built
51 machine.succeed("create-trivial-project.sh")
53 machine.wait_until_succeeds(
54 'curl -L -s http://localhost:3000/build/1 -H "Accept: application/json" | jq .buildstatus | xargs test 0 -eq'
57 machine.wait_until_succeeds(
58 'journalctl -eu hydra-notify.service -o cat | grep -q "sending mail notification to hydra@localhost"'
65 mapAttrs makeHydraTest hydraPkgs