forked from mirrors/nixpkgs
nixos/fanout: add test
This commit is contained in:
parent
d1df9108ba
commit
52effd56af
|
@ -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
30
nixos/tests/fanout.nix
Normal 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")
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue