mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
3fd324f823
Eelco has made several early contributions to NixOS including writing the samba module among other things, but is more or less inactive these days. By my brief inspection, he has not committed to the nixos/ tree since releasing Nix 2.13 in early 2023 and merging a PR to networking tests slightly before that. A lot of these tests/modules are actually unmaintained in practice, so we should update the code to reflect the practical reality so someone can consider picking them up.
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
# This test runs basic munin setup with node and cron job running on the same
|
|
# machine.
|
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
|
name = "munin";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ domenkozar ];
|
|
};
|
|
|
|
nodes = {
|
|
one =
|
|
{ config, ... }:
|
|
{
|
|
services = {
|
|
munin-node = {
|
|
enable = true;
|
|
# disable a failing plugin to prevent irrelevant error message, see #23049
|
|
disabledPlugins = [ "apc_nis" ];
|
|
};
|
|
munin-cron = {
|
|
enable = true;
|
|
hosts = ''
|
|
[${config.networking.hostName}]
|
|
address localhost
|
|
'';
|
|
};
|
|
};
|
|
|
|
# increase the systemd timer interval so it fires more often
|
|
systemd.timers.munin-cron.timerConfig.OnCalendar = pkgs.lib.mkForce "*:*:0/10";
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
|
|
with subtest("ensure munin-node starts and listens on 4949"):
|
|
one.wait_for_unit("munin-node.service")
|
|
one.wait_for_open_port(4949)
|
|
|
|
with subtest("ensure munin-cron output is correct"):
|
|
one.wait_for_file("/var/lib/munin/one/one-uptime-uptime-g.rrd")
|
|
one.wait_for_file("/var/www/munin/one/index.html")
|
|
one.wait_for_file("/var/www/munin/one/one/diskstat_iops_vda-day.png", timeout=60)
|
|
'';
|
|
})
|