summaryrefslogtreecommitdiffstats
path: root/nixos/tests/dae.nix
blob: f3e4edaf8f948a8568be647b864764c62f97ac89 (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
30
31
32
33
34
35
36
{ lib, pkgs, ... }:
{

  name = "dae";

  meta = {
    maintainers = with lib.maintainers; [ oluceps ];
  };

  nodes.machine =
    { pkgs, ... }:
    {
      environment.systemPackages = [ pkgs.curl ];
      services.nginx = {
        enable = true;
        statusPage = true;
      };
      services.dae = {
        enable = true;
        config = ''
          global { disable_waiting_network: true }
          routing{}
        '';
      };
    };

  testScript = ''
    machine.wait_for_unit("nginx.service")
    machine.wait_for_unit("dae.service")

    machine.wait_for_open_port(80)

    machine.succeed("curl --fail --max-time 10 http://localhost")
  '';

}