3
0
Fork 0
forked from mirrors/nixpkgs

nixos/fanout: add test

This commit is contained in:
Rishi Desai 2023-07-25 12:45:54 -05:00 committed by Anderson Torres
parent d1df9108ba
commit 52effd56af
2 changed files with 31 additions and 0 deletions

View file

@ -272,6 +272,7 @@ in {
fail2ban = handleTest ./fail2ban.nix { };
fakeroute = handleTest ./fakeroute.nix {};
fancontrol = handleTest ./fancontrol.nix {};
fanout = handleTest ./fanout.nix {};
fcitx5 = handleTest ./fcitx5 {};
fenics = handleTest ./fenics.nix {};
ferm = handleTest ./ferm.nix {};

30
nixos/tests/fanout.nix Normal file
View file

@ -0,0 +1,30 @@
{ system ? builtins.currentSystem
, config ? {}
, pkgs ? import ../.. { inherit system config; }
}:
import ./make-test-python.nix ({lib, pkgs, ...}: {
name = "fanout";
meta.maintainers = [ lib.maintainers.therishidesai ];
nodes = let
cfg = { ... }: {
services.fanout = {
enable = true;
fanoutDevices = 2;
bufferSize = 8192;
};
};
in {
machine = cfg;
};
testScript = ''
start_all()
# mDNS.
machine.wait_for_unit("multi-user.target")
machine.succeed("test -c /dev/fanout0")
machine.succeed("test -c /dev/fanout1")
'';
})