Files
cc-ci/tests/mumble/functional/test_tcp_health.py
autonomic-bot 6841048aae feat(2): Q4.2 mumble — parity port (health/protocol-handshake/web) + 2 specific + P4 sqlite
- functional/_mumble_proto.py: stdlib Mumble TLS protocol client (adapted from corpus mumble_connect.py)
- 3 parity ports: test_tcp_health, test_protocol_handshake (channel presence+ServerSync), test_web_client
- 2 NEW recipe-specific (P3): welcome-text + max-users config round-trips over the protocol
- P4: ops.py + test_backup/test_restore seed ci_marker in /data/mumble-server.sqlite (recipe's own backupbot DB), busy_timeout for live-server locks
- test_install overlay: voice server listening on 64738 (beyond web-sidecar readiness)
- recipe_meta: COMPOSE_FILE=compose.yml:mumbleweb:host-ports; WELCOME_TEXT/USERS markers
- PARITY.md mapping table

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 19:20:56 +01:00

27 lines
1.0 KiB
Python

"""mumble — TCP health parity port (Phase 2 P2).
SOURCE: recipe-info/mumble/tests/health_check.py — "Confirms the mumble server is listening on
port 64738 via TCP connection test." The original SSHes to the server and probes localhost:64738;
here the cc-ci run executes on the cc-ci host (cc-ci-run) and the recipe is deployed with
compose.host-ports.yml, so 64738 is published on the host — we probe 127.0.0.1:64738 directly.
"""
from __future__ import annotations
import socket
import time
def test_mumble_listening_on_64738(live_app):
"""The mumble voice server accepts a TCP connection on 64738 (host-published)."""
deadline = time.time() + 60
last_err = None
while time.time() < deadline:
try:
with socket.create_connection(("127.0.0.1", 64738), timeout=10):
return # connected — server is listening
except OSError as e: # noqa: PERF203
last_err = e
time.sleep(3)
raise AssertionError(f"mumble not listening on 127.0.0.1:64738 — last error: {last_err}")