nixos/tests/munin: port to python
This commit is contained in:
parent
4de58b617b
commit
2cda20c12e
|
@ -1,7 +1,7 @@
|
||||||
# This test runs basic munin setup with node and cron job running on the same
|
# This test runs basic munin setup with node and cron job running on the same
|
||||||
# machine.
|
# machine.
|
||||||
|
|
||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "munin";
|
name = "munin";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ domenkozar eelco ];
|
maintainers = [ domenkozar eelco ];
|
||||||
|
@ -25,20 +25,20 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# long timeout to prevent hydra failure on high load
|
|
||||||
systemd.services.munin-node.serviceConfig.TimeoutStartSec = "10min";
|
# increase the systemd timer interval so it fires more often
|
||||||
|
systemd.timers.munin-cron.timerConfig.OnCalendar = pkgs.stdenv.lib.mkForce "*:*:0/10";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
|
|
||||||
$one->waitForUnit("munin-node.service");
|
with subtest("ensure munin-node starts and listens on 4949"):
|
||||||
# make sure the node is actually listening
|
one.wait_for_unit("munin-node.service")
|
||||||
$one->waitForOpenPort(4949);
|
one.wait_for_open_port(4949)
|
||||||
$one->succeed('systemctl start munin-cron');
|
with subtest("ensure munin-cron output is correct"):
|
||||||
# wait for munin-cron output
|
one.wait_for_file("/var/lib/munin/one/one-uptime-uptime-g.rrd")
|
||||||
$one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd");
|
one.wait_for_file("/var/www/munin/one/index.html")
|
||||||
$one->waitForFile("/var/www/munin/one/index.html");
|
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user