summaryrefslogtreecommitdiffstats
path: root/nixos/tests/aurral.nix
blob: b3cd79092899dcc8a2a059da232e9155d08b9352 (plain)
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
{ lib, ... }:
{
  name = "aurral";
  meta = with lib.maintainers; {
    maintainers = [ hougo ];
  };

  nodes = {
    machine =
      { ... }:
      {
        services.aurral = {
          enable = true;
          environment = {
            DOWNLOAD_FOLDER = "/var/lib/aurral-downloads";
          };
        };
      };
  };

  testScript = ''
    start_all()

    machine.wait_for_unit("aurral.service")
    machine.wait_for_open_port(3001)

    machine.succeed('curl --fail http://localhost:3001/api/health')
  '';
}