Files
cc-ci/tests/wordpress/custom/test_health_check.py
autonomic-bot d9a446cd36
Some checks failed
continuous-integration/drone/push Build is failing
enroll(wordpress): test suite + bridge POLL_REPOS entry
Enrolls wordpress as a maintained recipe (operator request 2026-08-03):
- tests/wordpress/: recipe_meta (install-wizard-aware health 200/302, 900s deploy
  timeout for mariadb+core-copy first boot, WARM_CANONICAL), custom suite:
  health check, install-wizard completion + REST API round-trip (?rest_route= vs
  /wp-json/ splits DB vs .htaccess failure layers), and the sec4.3 post round-trip
  (XML-RPC write -> REST read -> permalink HTML, unique marker). PARITY.md documents
  the baseline (no recipe-maintainer parity corpus for wordpress).
- nix/modules/bridge.nix: POLL_REPOS += recipe-maintainers/wordpress (!testme bridge
  enrollment; deploy to the cc-ci host follows separately after the in-flight
  /upgrade-all run - test-before-switch policy).

Mirror recipe-maintainers/wordpress created + main synced to coopcloud upstream
(adcd0e9f) with published tags. used-recipes.md gains 'wordpress weekly' in the
orchestrator repo.
2026-08-03 21:05:33 +00:00

22 lines
861 B
Python

"""wordpress — Phase-2 health_check (no recipe-maintainer parity corpus for wordpress).
Asserts the served root responds: 200 (installed site) or 302 (redirect to the install
wizard on a fresh deploy). Either proves traefik → app wiring; the deeper DB/API proofs
live in test_install_and_api / test_post_roundtrip.
"""
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_wordpress_root_serves(live_app):
"""GET / → 200 or 302 (install-wizard redirect on a fresh deploy)."""
url = f"https://{live_app}/"
status, _ = harness_http.retry_http_get(url, expect_status=(200, 302), max_wait=90, interval=5)
assert status in (200, 302), f"GET {url} HTTP {status} (expected 200 or 302)"