nixosTests.netbird: init

This commit is contained in:
misuzu 2022-08-14 19:59:15 +03:00
parent 5fcdceb0b2
commit c1ba9c9c8b
3 changed files with 24 additions and 0 deletions

View file

@ -357,6 +357,7 @@ in {
ncdns = handleTest ./ncdns.nix {};
ndppd = handleTest ./ndppd.nix {};
nebula = handleTest ./nebula.nix {};
netbird = handleTest ./netbird.nix {};
neo4j = handleTest ./neo4j.nix {};
netdata = handleTest ./netdata.nix {};
networking.networkd = handleTest ./networking.nix { networkd = true; };

21
nixos/tests/netbird.nix Normal file
View file

@ -0,0 +1,21 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
{
name = "netbird";
meta = with pkgs.lib.maintainers; {
maintainers = [ misuzu ];
};
nodes = {
node = { ... }: {
services.netbird.enable = true;
};
};
testScript = ''
start_all()
node.wait_for_unit("netbird.service")
node.wait_for_file("/var/run/netbird/sock")
node.succeed("netbird status | grep -q 'Daemon status: NeedsLogin'")
'';
})

View file

@ -80,6 +80,8 @@ buildGoModule rec {
--replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui"
'';
passthru.tests.netbird = nixosTests.netbird;
meta = with lib; {
homepage = "https://netbird.io";
description = "Connect your devices into a single secure private WireGuard®-based mesh network with SSO/MFA and simple access controls";