1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/nixos/tests/smokeping.nix
Florian Klink b2f3bd4d79
Merge pull request #100155 from primeos/nixos-add-fqdn-option
nixos/networking: Add a read-only option for the FQDN
2021-01-25 16:45:45 +01:00

35 lines
906 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : {
name = "smokeping";
meta = with pkgs.lib.maintainers; {
maintainers = [ cransom ];
};
nodes = {
sm =
{ ... }:
{
networking.domain = "example.com"; # FQDN: sm.example.com
services.smokeping = {
enable = true;
port = 8081;
mailHost = "127.0.0.2";
probeConfig = ''
+ FPing
binary = /run/wrappers/bin/fping
offset = 0%
'';
};
};
};
testScript = ''
start_all()
sm.wait_for_unit("smokeping")
sm.wait_for_unit("thttpd")
sm.wait_for_file("/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")
'';
})