Some checks failed
continuous-integration/drone/push Build is failing
Having test_backup.py in custom-html-bkp-bad caused both bad-backup and bad-restore to fail at the backup tier. Create custom-html-rst-bad with its own cc-ci test dir that has ops.py+test_restore.py but NO test_backup.py, so: - backup: only generic test_backup_artifact → PASS (snapshot exists) - restore: pre_restore writes 'mutated', marker stays 'mutated' after restore → FAIL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
512 B
Python
16 lines
512 B
Python
"""custom-html-rst-bad — lifecycle ops for bad-restore RED canary.
|
|
|
|
NO pre_backup hook: marker never seeded before backup → snapshot has no ci-marker.txt.
|
|
pre_restore writes "mutated". After restore, marker stays "mutated" (not in snapshot) → FAIL.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from harness import lifecycle
|
|
|
|
MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt"
|
|
|
|
|
|
def pre_restore(domain: str, meta: dict) -> None:
|
|
lifecycle.exec_in_app(domain, ["sh", "-c", f"echo mutated > {MARKER_PATH}"])
|