1# This test does a basic functionality check for alice-lg
2
3{ system ? builtins.currentSystem
4, pkgs ? import ../.. { inherit system; config = { }; }
5}:
6
7let
8 inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
9 inherit (pkgs.lib) optionalString;
10in
11makeTest {
12 name = "birdwatcher";
13 nodes = {
14 host1 = {
15 environment.systemPackages = with pkgs; [ jq ];
16 services.alice-lg = {
17 enable = true;
18 settings = {
19 server = {
20 listen_http = "[::]:7340";
21 enable_prefix_lookup = true;
22 asn = 1;
23 routes_store_refresh_parallelism = 5;
24 neighbors_store_refresh_parallelism = 10000;
25 routes_store_refresh_interval = 5;
26 neighbors_store_refresh_interval = 5;
27 };
28 housekeeping = {
29 interval = 5;
30 force_release_memory = true;
31 };
32 };
33 };
34 };
35 };
36
37 testScript = ''
38 start_all()
39
40 host1.wait_for_unit("alice-lg.service")
41 host1.wait_for_open_port(7340)
42 host1.succeed("curl http://[::]:7340 | grep 'Alice BGP Looking Glass'")
43 '';
44}