mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
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 New Issue
Block a user