1 import ./make-test-python.nix {
4 nodes.machine = { ... }: {
5 services.ntfy-sh.enable = true;
6 services.ntfy-sh.settings.base-url = "http://localhost:2586";
12 msg = "Test notification"
14 machine.wait_for_unit("multi-user.target")
16 machine.wait_for_open_port(2586)
18 machine.succeed(f"curl -d '{msg}' localhost:2586/test")
20 notif = json.loads(machine.succeed("curl -s localhost:2586/test/json?poll=1"))
22 assert msg == notif["message"], "Wrong message"
24 machine.succeed("ntfy user list")