diff options
| author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2021-12-17 00:55:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-17 00:55:24 +0100 |
| commit | f979bea86d5b67f7af3c2bb2b7963a1dccc704da (patch) | |
| tree | 2bfc5b85d443d516ead8cbca5312362392517f6f | |
| parent | Merge pull request #151011 from NixOS/backport-150614-to-release-21.05 (diff) | |
| parent | nixos/snapserver: use the correct bind address arguments (diff) | |
| download | nixpkgs-f979bea86d5b67f7af3c2bb2b7963a1dccc704da.tar.gz | |
Merge pull request #151032 from NixOS/backport-151029-to-release-21.05
| -rw-r--r-- | nixos/modules/services/audio/snapserver.nix | 4 | ||||
| -rw-r--r-- | nixos/tests/snapcast.nix | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/audio/snapserver.nix b/nixos/modules/services/audio/snapserver.nix index f96b5f3e1942..a91bc308c310 100644 --- a/nixos/modules/services/audio/snapserver.nix +++ b/nixos/modules/services/audio/snapserver.nix @@ -54,12 +54,12 @@ let # tcp json rpc ++ [ "--tcp.enabled ${toString cfg.tcp.enable}" ] ++ optionals cfg.tcp.enable [ - "--tcp.address ${cfg.tcp.listenAddress}" + "--tcp.bind_to_address ${cfg.tcp.listenAddress}" "--tcp.port ${toString cfg.tcp.port}" ] # http json rpc ++ [ "--http.enabled ${toString cfg.http.enable}" ] ++ optionals cfg.http.enable [ - "--http.address ${cfg.http.listenAddress}" + "--http.bind_to_address ${cfg.http.listenAddress}" "--http.port ${toString cfg.http.port}" ] ++ optional (cfg.http.docRoot != null) "--http.doc_root \"${toString cfg.http.docRoot}\""); diff --git a/nixos/tests/snapcast.nix b/nixos/tests/snapcast.nix index ef35d586c9c8..c04640949722 100644 --- a/nixos/tests/snapcast.nix +++ b/nixos/tests/snapcast.nix @@ -40,6 +40,7 @@ in { }; }; }; + environment.systemPackages = [ pkgs.snapcast ]; }; client = { environment.systemPackages = [ pkgs.snapcast ]; @@ -71,6 +72,13 @@ in { "curl --fail http://localhost:${toString httpPort}/jsonrpc -d '{json.dumps(get_rpc_version)}'" ) + with subtest("test a ipv6 connection"): + server.execute("systemd-run --unit=snapcast-local-client snapclient -h ::1 -p ${toString port}") + server.wait_until_succeeds( + "journalctl -o cat -u snapserver.service | grep -q 'Hello from'" + ) + server.wait_until_succeeds("journalctl -o cat -u snapcast-local-client | grep -q 'buffer: ${toString bufferSize}'") + with subtest("test a connection"): client.execute("systemd-run snapclient -h server -p ${toString port}") server.wait_until_succeeds( |
