mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 02:06:46 +01:00
34 lines
850 B
Nix
34 lines
850 B
Nix
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "smokeping";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ cransom ];
|
|
};
|
|
|
|
nodes = {
|
|
sm =
|
|
{ ... }:
|
|
{
|
|
services.smokeping = {
|
|
enable = true;
|
|
port = 8081;
|
|
mailHost = "127.0.0.2";
|
|
probeConfig = ''
|
|
+ FPing
|
|
binary = /run/wrappers/bin/fping
|
|
offset = 0%
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
startAll;
|
|
$sm->waitForUnit("smokeping");
|
|
$sm->waitForUnit("thttpd");
|
|
$sm->waitForFile("/var/lib/smokeping/data/Local/LocalMachine.rrd");
|
|
$sm->succeed("curl -s -f localhost:8081/smokeping.fcgi?target=Local");
|
|
$sm->succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png");
|
|
$sm->succeed("ls /var/lib/smokeping/cache/index.html");
|
|
'';
|
|
})
|