1 import ./make-test-python.nix ({ pkgs, ...} : {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ cransom ];
11 networking.domain = "example.com"; # FQDN: sm.example.com
12 services.smokeping = {
14 mailHost = "127.0.0.2";
17 binary = /run/wrappers/bin/fping
26 sm.wait_for_unit("smokeping")
27 sm.wait_for_unit("nginx")
28 sm.wait_for_file("/var/lib/smokeping/data/Local/LocalMachine.rrd")
29 sm.succeed("curl -s -f localhost/smokeping.fcgi?target=Local")
30 # Check that there's a helpful page without explicit path as well.
31 sm.succeed("curl -s -f localhost")
32 sm.succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png")
33 sm.succeed("ls /var/lib/smokeping/cache/index.html")
35 # stop and start the service like nixos-rebuild would do
36 # see https://github.com/NixOS/nixpkgs/issues/265953)
37 sm.succeed("systemctl stop smokeping")
38 sm.succeed("systemctl start smokeping")
39 # ensure all services restarted properly
40 sm.succeed("systemctl --failed | grep -q '0 loaded units listed'")