vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / nixos / tests / alice-lg.nix
blob640e60030a04e818d5ac3b6c468a90897cf1f561
1 # This test does a basic functionality check for alice-lg
3 { system ? builtins.currentSystem
4 , pkgs ? import ../.. { inherit system; config = { }; }
5 }:
7 let
8   inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
9   inherit (pkgs.lib) optionalString;
11 makeTest {
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   };
37   testScript = ''
38     start_all()
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   '';