summaryrefslogtreecommitdiffstats
path: root/nixos/tests/alice-lg.nix
blob: f2f21e3e61a27e07273858f0c940fc4ca78d595f (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
37
38
39
40
# This test does a basic functionality check for alice-lg
{
  pkgs,
  ...
}:

{
  name = "alice-lg";
  nodes = {
    host1 = {
      environment.systemPackages = with pkgs; [ jq ];
      services.alice-lg = {
        enable = true;
        settings = {
          server = {
            listen_http = "[::]:7340";
            enable_prefix_lookup = true;
            asn = 1;
            routes_store_refresh_parallelism = 5;
            neighbors_store_refresh_parallelism = 10000;
            routes_store_refresh_interval = 5;
            neighbors_store_refresh_interval = 5;
          };
          housekeeping = {
            interval = 5;
            force_release_memory = true;
          };
        };
      };
    };
  };

  testScript = ''
    start_all()

    host1.wait_for_unit("alice-lg.service")
    host1.wait_for_open_port(7340)
    host1.succeed("curl http://[::]:7340 | grep 'Alice BGP Looking Glass'")
  '';
}