nixpkgs/nixos/tests/syncthing-relay.nix
Wolfgang Walther 1c6af9ba0a
treewide: remove unused with
Auto-fixed by nixf-diagnose.

(cherry picked from commit c283f32d29)
2025-10-05 12:38:28 +02:00

30 lines
738 B
Nix

import ./make-test-python.nix (
{ lib, pkgs, ... }:
{
name = "syncthing-relay";
meta.maintainers = [ ];
nodes.machine = {
environment.systemPackages = [ pkgs.jq ];
services.syncthing.relay = {
enable = true;
providedBy = "nixos-test";
pools = [ ]; # Don't connect to any pool while testing.
port = 12345;
statusPort = 12346;
};
};
testScript = ''
machine.wait_for_unit("syncthing-relay.service")
machine.wait_for_open_port(12345)
machine.wait_for_open_port(12346)
out = machine.succeed(
"curl -sSf http://localhost:12346/status | jq -r '.options.\"provided-by\"'"
)
assert "nixos-test" in out
'';
}
)