Files
cc-ci/tests/custom-html/test_backup.py
autonomic-bot 7a7d6840b3
Some checks failed
continuous-integration/drone/push Build is failing
fix(tests): track custom-html /var docroot
2026-06-01 19:55:39 +00:00

22 lines
970 B
Python

"""custom-html — BACKUP overlay (Phase 1e HC3): assertion-only + additive.
The orchestrator ran `ops.pre_backup` (seeded "original" into the served volume), then performed the
backup ONCE. The generic backup tier already asserted a snapshot artifact was produced; this overlay
ADDS the recipe-specific check: the seeded "original" state is intact in the volume post-backup
(pre-mutation). The backup→restore divergence happens in `ops.pre_restore`. Reads via exec_in_app
(volume-direct), immune to the post-backup serving race after backup-bot-two cycles the container."""
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
from harness import lifecycle # noqa: E402
MARKER_PATH = "/var/www/html/ci-marker.txt"
def test_backup_captures_state(live_app):
assert (
lifecycle.exec_in_app(live_app, ["cat", MARKER_PATH]).strip() == "original"
), "the seeded state was not present at backup time"