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