- 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>
27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
"""mumble — BACKUP overlay (Phase 1e HC3 / Phase 2 P4): assertion-only + additive.
|
|
|
|
ops.pre_backup seeded ci_marker='original' into /data/mumble-server.sqlite before the backup op
|
|
(the recipe's backupbot pre-hook `.backup`s that exact file). The orchestrator performed the backup
|
|
once (generic tier asserted a snapshot artifact). This overlay ADDS: the seeded row is intact at
|
|
backup time. The backup→restore divergence (dropping the table) is in ops.pre_restore.
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
|
|
from harness import lifecycle # noqa: E402
|
|
|
|
DB = "/data/mumble-server.sqlite"
|
|
|
|
|
|
def _sqlite(domain, sql):
|
|
cmd = f'sqlite3 {DB} "PRAGMA busy_timeout=20000; {sql}"'
|
|
return lifecycle.exec_in_app(domain, ["sh", "-c", cmd], service="app").strip()
|
|
|
|
|
|
def test_backup_captures_state(live_app):
|
|
assert _sqlite(live_app, "SELECT v FROM ci_marker;") == "original", (
|
|
"the seeded mumble sqlite marker was not present at backup time"
|
|
)
|