summary refs log tree commit diff
path: root/nixos/tests/hydra.nix
blob: 6abd7a5ad30040723f97ac2f098c4554f52bb0f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import ./make-test.nix ({ pkgs, ...} : {
  name = "hydra-init-localdb";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ pstn ];
  };

  machine =
    { config, pkgs, ... }:

    {
      services.hydra = {
        enable = true;

        #Hydra needs those settings to start up, so we add something not harmfull.
        hydraURL = "example.com";
        notificationSender = "example@example.com";
      };
    };

  testScript =
    ''
      # let the system boot up
      $machine->waitForUnit("multi-user.target");
      # test whether the database is running
      $machine->succeed("systemctl status postgresql.service");
      # test whether the actual hydra daemons are running
      $machine->succeed("systemctl status hydra-queue-runner.service");
      $machine->succeed("systemctl status hydra-init.service");
      $machine->succeed("systemctl status hydra-evaluator.service");
      $machine->succeed("systemctl status hydra-send-stats.service");
     '';
})