Add satellite integration tests

5 new tests covering satellite protocol: handshake and /status visibility,
audio delivery from satellite to parent's local clients, trunk-to-satellite
audio forwarding, satellite audio routed to trunk peers via parent, and
disconnect cleanup. Reflector-a acts as the satellite parent with a
[SATELLITE] section; a SatellitePeer class connects as a fake satellite
using MsgTrunkHello with ROLE_SATELLITE.
This commit is contained in:
Audric committed 2026-03-27 14:58:51 +01:00
1 parent 685d7253ff
commit d2f4acffcd
3 files changed
+231 -1

No files matched your search

+19 -1
View File
@@ -74,6 +74,16 @@ def generate_reflector_conf(name: str) -> str:
"",
]
# Satellite server section (only on the primary reflector)
primary = sorted(T.REFLECTORS)[0]
if name == primary:
lines += [
"[SATELLITE]",
f"LISTEN_PORT={T.SATELLITE['listen_port']}",
f"SECRET={T.SATELLITE['secret']}",
"",
]
return "\n".join(lines)
@@ -82,6 +92,8 @@ def generate_docker_compose() -> str:
services = []
volumes = []
primary = sorted(T.REFLECTORS)[0]
for name in sorted(T.REFLECTORS):
svc = T.service_name(name)
client_port = T.mapped_client_port(name)
@@ -90,6 +102,12 @@ def generate_docker_compose() -> str:
vol = f"pki-{name}"
volumes.append(vol)
# Satellite port only on the primary reflector
sat_port_line = ""
if name == primary:
sat_port = T.mapped_satellite_port(name)
sat_port_line = f'\n - "{sat_port}:{T.SATELLITE["listen_port"]}/tcp"'
services.append(f""" {svc}:
build:
context: ..
@@ -101,7 +119,7 @@ def generate_docker_compose() -> str:
- "{client_port}:{T.INTERNAL_CLIENT_PORT}/tcp"
- "{client_port}:{T.INTERNAL_CLIENT_PORT}/udp"
- "{trunk_port}:{T.INTERNAL_TRUNK_PORT}/tcp"
- "{http_port}:{T.INTERNAL_HTTP_PORT}/tcp"
- "{http_port}:{T.INTERNAL_HTTP_PORT}/tcp"{sat_port_line}
healthcheck:
test: ["CMD-SHELL", "bash -c '(echo > /dev/tcp/localhost/{T.INTERNAL_HTTP_PORT}) 2>/dev/null'"]
interval: 2s