forked from mirrors/nixpkgs
Merge pull request #151029 from andir/snapcast-bind
This commit is contained in:
commit
8086f8658e
|
@ -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}\"");
|
||||
|
||||
|
|
|
@ -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 --unit=snapcast-client snapclient -h server -p ${toString port}")
|
||||
server.wait_until_succeeds(
|
||||
|
|
Loading…
Reference in a new issue