Compare commits

...

3 Commits

Author SHA1 Message Date
7a7d6840b3 fix(tests): track custom-html /var docroot
Some checks failed
continuous-integration/drone/push Build is failing
2026-06-01 19:55:39 +00:00
d6a8f6f6b6 fix(tests): create custom-html seeded docroot
Some checks failed
continuous-integration/drone/push Build is failing
2026-06-01 19:51:44 +00:00
5650875dfe fix(tests): follow custom-html docroot move
Some checks failed
continuous-integration/drone/push Build is failing
2026-06-01 19:42:22 +00:00
6 changed files with 9 additions and 9 deletions

View File

@ -23,11 +23,11 @@ def test_content_roundtrip(live_app):
exact bytes round-trip. Non-vacuous: a stale page or misrouted backend would not return our
randomly-generated content."""
marker = f"ccci-roundtrip-{uuid.uuid4().hex}"
# written into the served volume; nginx routes /<filename> to /usr/share/nginx/html/<filename>
# written into the served volume; nginx routes /<filename> to /var/www/html/<filename>
filename = f"ccci-roundtrip-{uuid.uuid4().hex[:12]}.txt"
lifecycle.exec_in_app(
live_app,
["sh", "-c", f"printf %s {marker} > /usr/share/nginx/html/{filename}"],
["sh", "-c", f"mkdir -p /var/www/html && printf %s {marker} > /var/www/html/{filename}"],
)
url = f"https://{live_app}/{filename}"

View File

@ -40,7 +40,7 @@ def test_content_type_html_and_txt(live_app):
body = "hello"
for name in (html_name, txt_name):
lifecycle.exec_in_app(
live_app, ["sh", "-c", f"printf %s {body} > /usr/share/nginx/html/{name}"]
live_app, ["sh", "-c", f"mkdir -p /var/www/html && printf %s {body} > /var/www/html/{name}"]
)
s_html, h_html = _head(f"https://{live_app}/{html_name}")

View File

@ -1,7 +1,7 @@
"""custom-html — pre-op seed hooks (Phase 1e HC3). The orchestrator runs `pre_<op>(domain, meta)`
BEFORE it performs the op; the matching test_<op>.py asserts the post-op state (assertion-only).
nginx serves the volume at /usr/share/nginx/html, so the marker file survives an upgrade / a
nginx serves the volume at /var/www/html, so the marker file survives an upgrade / a
backup+restore of that volume and is both HTTP-readable and exec-readable."""
import os
@ -10,11 +10,11 @@ import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
from harness import lifecycle # noqa: E402
MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt"
MARKER_PATH = "/var/www/html/ci-marker.txt"
def _write(domain: str, val: str) -> None:
lifecycle.exec_in_app(domain, ["sh", "-c", f"echo {val} > {MARKER_PATH}"])
lifecycle.exec_in_app(domain, ["sh", "-c", f"mkdir -p $(dirname {MARKER_PATH}) && echo {val} > {MARKER_PATH}"])
def pre_upgrade(domain, meta):

View File

@ -12,7 +12,7 @@ import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
from harness import lifecycle # noqa: E402
MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt"
MARKER_PATH = "/var/www/html/ci-marker.txt"
def test_backup_captures_state(live_app):

View File

@ -12,7 +12,7 @@ import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
from harness import lifecycle # noqa: E402
MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt"
MARKER_PATH = "/var/www/html/ci-marker.txt"
def test_restore_returns_state(live_app):

View File

@ -11,7 +11,7 @@ import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
from harness import lifecycle # noqa: E402
MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt"
MARKER_PATH = "/var/www/html/ci-marker.txt"
def test_upgrade_preserves_data(live_app):