fix(regression): separate recipe for bad-restore (custom-html-rst-bad)
Some checks failed
continuous-integration/drone/push Build is failing
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>
This commit is contained in:
15
tests/custom-html-rst-bad/ops.py
Normal file
15
tests/custom-html-rst-bad/ops.py
Normal file
@ -0,0 +1,15 @@
|
||||
"""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}"])
|
||||
Reference in New Issue
Block a user