mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
4a9b640f37
Includes a module for service setup and a test to verify functionality of both service and pkg.
32 lines
770 B
Nix
32 lines
770 B
Nix
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "smokeping";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ cransom ];
|
|
};
|
|
|
|
nodes = {
|
|
sm =
|
|
{ pkgs, config, ... }:
|
|
{
|
|
services.smokeping = {
|
|
enable = true;
|
|
port = 8081;
|
|
probeConfig = ''
|
|
+ FPing
|
|
binary = ${pkgs.fping}/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");
|
|
'';
|
|
})
|