summary refs log tree commit diff
path: root/nixos/tests/munin.nix
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2013-10-20 21:16:13 +0200
committerDomen Kožar <domen@dev.si>2013-10-20 21:16:24 +0200
commitaeff0028bfbef56796a6d8eb126a664ca8350893 (patch)
treea74347b80c8e377beb61a4391088df7c4052d2e9 /nixos/tests/munin.nix
parentde419ca920b1a40a47f001ec197930658b89c15e (diff)
downloadnixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.tar
nixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.tar.gz
nixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.tar.bz2
nixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.tar.lz
nixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.tar.xz
nixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.tar.zst
nixpkgs-aeff0028bfbef56796a6d8eb126a664ca8350893.zip
munin: add test and fix a bug
Diffstat (limited to 'nixos/tests/munin.nix')
-rw-r--r--nixos/tests/munin.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/tests/munin.nix b/nixos/tests/munin.nix
new file mode 100644
index 00000000000..66ae1c0d87f
--- /dev/null
+++ b/nixos/tests/munin.nix
@@ -0,0 +1,31 @@
+{ pkgs, ... }:
+
+# This test runs basic munin setup with node and cron job running on the same
+# machine.
+
+{
+  nodes = { 
+    one =
+      { config, pkgs, ... }:
+        { 
+          services = {
+           munin-node.enable = true;
+           munin-cron = {
+             enable = true;
+             hosts = ''
+               [${config.networking.hostName}]
+               address localhost
+             '';
+           };
+          };
+        };
+    };
+  
+  testScript = ''
+    startAll;
+  
+    $one->waitForUnit("munin-node.service");
+    $one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd");
+    $one->waitForFile("/var/www/munin/one/index.html");
+  '';
+}