continuous-integration/drone/push Build is failing
`scripts/lint.sh --fix` from the pinned lint devshell: 90 Python files reformatted (ruff format, mechanical) and one C420 (dict comprehension → dict.fromkeys) in tests/unit/test_f211_sso_skip.py. The push self-test had been failing at the lint stage since build 1313 (2026-08-31) on exactly these files; nothing else changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FqkQq3CDmFWcQ7u1LzoyRz
29 lines
1.3 KiB
Python
29 lines
1.3 KiB
Python
"""matrix-synapse — health-check parity port (Phase 2 P2).
|
|
|
|
SOURCE: there is no `recipe-info/matrix-synapse/tests/health_check.py` in the recipe-maintainer
|
|
corpus (the corpus's matrix-synapse tests are shell scripts targeting a persistent instance —
|
|
see DECISIONS.md for the Q4 deeper-port deferral). This file is a Phase-2 health_check ALIGNED
|
|
with the parity-port convention: HTTP 200 from the client API versions endpoint, which is the
|
|
recipe's HEALTH_PATH and the canonical "is synapse up" signal.
|
|
|
|
Runs in the custom tier against the shared post-install live deployment.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", "runner"))
|
|
from harness import http as harness_http # noqa: E402
|
|
|
|
|
|
def test_synapse_client_versions_returns_json(live_app):
|
|
"""Verify /_matrix/client/versions returns 200 + a JSON document with a non-empty versions list."""
|
|
url = f"https://{live_app}/_matrix/client/versions"
|
|
status, body = harness_http.retry_http_get(url, expect_status=200, max_wait=60, interval=3)
|
|
assert status == 200, f"GET {url} HTTP {status} (expected 200)"
|
|
assert isinstance(body, dict) and isinstance(body.get("versions"), list) and body["versions"], (
|
|
f"GET {url} did not return Matrix client-versions document: {body!r}"
|
|
)
|