@@ -0,0 +1,30 @@
1+import ./make-test.nix ({ pkgs, lib, ... }:
2+
3+with lib;
4+
5+{
6+ name = "iftop";
7+ meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
8+
9+ nodes = {
10+ withIftop = {
11+ imports = [ ./common/user-account.nix ];
12+
13+ programs.iftop.enable = true;
14+ };
15+ withoutIftop = {
16+ imports = [ ./common/user-account.nix ];
17+ };
18+ };
19+
20+ testScript = ''
21+ subtest "machine with iftop enabled", sub {
22+ $withIftop->start;
23+ $withIftop->succeed("su -l alice -c 'iftop -t -s 1'");
24+ };
25+ subtest "machine without iftop", sub {
26+ $withoutIftop->start;
27+ $withoutIftop->mustFail("su -l alice -c 'iftop -t -s 1'");
28+ };
29+ '';
30+})