diff options
author | DavHau <hsngrmpf+github@gmail.com> | 2024-05-12 12:55:43 +0200 |
---|---|---|
committer | DavHau <hsngrmpf+github@gmail.com> | 2024-05-12 13:31:11 +0200 |
commit | 0b6c48484828fe48476759e8f8781ff9c876ebaa (patch) | |
tree | 791963f0dcffb6e36b1ca2428af60296548a84f7 /nixos/tests | |
parent | 894929122170b815a0b091a646db07693c92144d (diff) |
nixos/smokeping: use nginx instead of thttpd
Motivation: fixes #265953 Changes: - deprecate `services.smokeping.port` in favor of the niginx native option - mention in release notes
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/smokeping.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nixos/tests/smokeping.nix b/nixos/tests/smokeping.nix index 04f8139642918..fe1ecad9969b0 100644 --- a/nixos/tests/smokeping.nix +++ b/nixos/tests/smokeping.nix @@ -11,7 +11,6 @@ import ./make-test-python.nix ({ pkgs, ...} : { networking.domain = "example.com"; # FQDN: sm.example.com services.smokeping = { enable = true; - port = 8081; mailHost = "127.0.0.2"; probeConfig = '' + FPing @@ -25,12 +24,19 @@ import ./make-test-python.nix ({ pkgs, ...} : { testScript = '' start_all() sm.wait_for_unit("smokeping") - sm.wait_for_unit("thttpd") + sm.wait_for_unit("nginx") sm.wait_for_file("/var/lib/smokeping/data/Local/LocalMachine.rrd") - sm.succeed("curl -s -f localhost:8081/smokeping.fcgi?target=Local") + sm.succeed("curl -s -f localhost/smokeping.fcgi?target=Local") # Check that there's a helpful page without explicit path as well. - sm.succeed("curl -s -f localhost:8081") + sm.succeed("curl -s -f localhost") sm.succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png") sm.succeed("ls /var/lib/smokeping/cache/index.html") + + # stop and start the service like nixos-rebuild would do + # see https://github.com/NixOS/nixpkgs/issues/265953) + sm.succeed("systemctl stop smokeping") + sm.succeed("systemctl start smokeping") + # ensure all services restarted properly + sm.succeed("systemctl --failed | grep -q '0 loaded units listed'") ''; }) |