1 import ./make-test-python.nix ({ pkgs, lib, ... }:
5 meta.maintainers = with lib.maintainers; [ ma27 ];
9 imports = [ ./common/user-account.nix ];
10 programs.iftop.enable = true;
13 imports = [ ./common/user-account.nix ];
14 environment.systemPackages = [ pkgs.iftop ];
19 with subtest("machine with iftop enabled"):
20 withIftop.wait_for_unit("default.target")
21 # limit to eth1 (eth0 is the test driver's control interface)
22 # and don't try name lookups
23 withIftop.succeed("su -l alice -c 'iftop -t -s 1 -n -i eth1'")
25 with subtest("machine without iftop"):
26 withoutIftop.wait_for_unit("default.target")
27 # check that iftop is there but user alice lacks capabilitie
28 withoutIftop.succeed("iftop -t -s 1 -n -i eth1")
29 withoutIftop.fail("su -l alice -c 'iftop -t -s 1 -n -i eth1'")