zt-tcp-relay: add clan module + test

This commit is contained in:
Jörg Thalheim
2024-01-12 14:25:31 +01:00
parent a7551c16e2
commit 08085d81dd
4 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
(import ../lib/container-test.nix) ({ pkgs, ... }: {
name = "zt-tcp-relay";
nodes.machine = { self, ... }: {
imports = [
self.nixosModules.clanCore
self.clanModules.zt-tcp-relay
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
}
];
};
testScript = ''
start_all()
machine.wait_for_unit("zt-tcp-relay.service")
out = machine.succeed("${pkgs.netcat}/bin/nc -z -v localhost 4443")
print(out)
'';
})