at 23.05-pre 419 B view raw
1import ./make-test-python.nix { 2 3 nodes.machine = { ... }: { 4 services.ntfy-sh.enable = true; 5 }; 6 7 testScript = '' 8 import json 9 10 msg = "Test notification" 11 12 machine.wait_for_unit("multi-user.target") 13 14 machine.succeed(f"curl -d '{msg}' localhost:80/test") 15 16 notif = json.loads(machine.succeed("curl -s localhost:80/test/json?poll=1")) 17 18 assert msg == notif["message"], "Wrong message" 19 ''; 20}