Compare commits
3 Commits
mirror-pha
...
v6-custom-
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a7d6840b3 | |||
| d6a8f6f6b6 | |||
| 5650875dfe |
@ -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}"
|
||||
|
||||
@ -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}")
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
Reference in New Issue
Block a user