1 # This test does a basic functionality check for birdwatcher
3 { system ? builtins.currentSystem
4 , pkgs ? import ../.. { inherit system; config = { }; }
8 inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
9 inherit (pkgs.lib) optionalString;
15 environment.systemPackages = with pkgs; [ jq ];
28 protocol kernel kernel4 {
35 protocol kernel kernel6 {
43 services.birdwatcher = {
48 allow_uncached = false
49 modules_enabled = ["status",
56 "routes_table_filtered",
61 "routes_pipe_filtered_count",
62 "routes_pipe_filtered"
65 reconfig_timestamp_source = "bird"
66 reconfig_timestamp_match = "# created: (.*)"
69 listen = "0.0.0.0:29184"
70 config = "/etc/bird/bird2.conf"
71 birdc = "${pkgs.bird}/bin/birdc"
72 ttl = 5 # time to live (in minutes) for caching of cli output
76 use_redis = false # if not using redis cache, activate housekeeping to save memory!
79 force_release_memory = true
88 host1.wait_for_unit("bird2.service")
89 host1.wait_for_unit("birdwatcher.service")
90 host1.wait_for_open_port(29184)
91 host1.succeed("curl http://[::]:29184/status | jq -r .status.message | grep 'Daemon is up and running'")
92 host1.succeed("curl http://[::]:29184/protocols | jq -r .protocols.device1.state | grep 'up'")