@@ -1,4 +1,4 @@
1−import ./make-test.nix ({ lib, pkgs, ... }: {
1+import ./make-test-python.nix ({ lib, pkgs, ... }: {
22 name = "syncthing-relay";
33 meta.maintainers = with pkgs.stdenv.lib.maintainers; [ delroth ];
44
@@ -14,9 +14,13 @@ import ./make-test.nix ({ lib, pkgs, ... }: {
1414 };
1515
1616 testScript = ''
17− $machine->waitForUnit("syncthing-relay.service");
18− $machine->waitForOpenPort(12345);
19− $machine->waitForOpenPort(12346);
20− $machine->succeed("curl http://localhost:12346/status | jq -r '.options.\"provided-by\"'") =~ /nixos-test/ or die;
17+ machine.wait_for_unit("syncthing-relay.service")
18+ machine.wait_for_open_port(12345)
19+ machine.wait_for_open_port(12346)
20+
21+ out = machine.succeed(
22+ "curl -sS http://localhost:12346/status | jq -r '.options.\"provided-by\"'"
23+ )
24+ assert "nixos-test" in out
2125 '';
2226})