at 25.11-pre 1.6 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, lib, ... }: 3 { 4 name = "netbird"; 5 6 meta.maintainers = with pkgs.lib.maintainers; [ 7 nazarewk 8 ]; 9 10 nodes = { 11 clients = 12 { ... }: 13 { 14 services.netbird.enable = true; 15 services.netbird.clients.custom.port = 51819; 16 }; 17 }; 18 19 # TODO: confirm the whole solution is working end-to-end when netbird server is implemented 20 testScript = '' 21 start_all() 22 def did_start(node, name): 23 node.wait_for_unit(f"{name}.service") 24 node.wait_for_file(f"/var/run/{name}/sock") 25 output = node.succeed(f"{name} status") 26 27 # not sure why, but it can print either of: 28 # - Daemon status: NeedsLogin 29 # - Management: Disconnected 30 expected = [ 31 "Disconnected", 32 "NeedsLogin", 33 ] 34 assert any(msg in output for msg in expected) 35 36 did_start(clients, "netbird") 37 did_start(clients, "netbird-custom") 38 ''; 39 40 /* 41 `netbird status` used to print `Daemon status: NeedsLogin` 42 https://github.com/netbirdio/netbird/blob/23a14737974e3849fa86408d136cc46db8a885d0/client/cmd/status.go#L154-L164 43 as the first line, but now it is just: 44 45 Daemon version: 0.26.3 46 CLI version: 0.26.3 47 Management: Disconnected 48 Signal: Disconnected 49 Relays: 0/0 Available 50 Nameservers: 0/0 Available 51 FQDN: 52 NetBird IP: N/A 53 Interface type: N/A 54 Quantum resistance: false 55 Routes: - 56 Peers count: 0/0 Connected 57 */ 58 } 59)