Files
cc-ci/tests/gitea/test_backup.py
autonomic-bot 2d865f06cb
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
fix(gtea): ruff format + check all gtea files and bridge.py
Clears cc-ci self-test lint failures:
- ruff format: 9 files reformatted (all gtea test files + test_discovery.py)
- ruff check --fix: bridge.py UP017 (datetime.UTC alias) + 6 gtea check errors
- manifest.py B007: rename unused loop variable path → _path (no auto-fix available)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 21:52:01 +00:00

28 lines
1.1 KiB
Python

"""gitea — BACKUP overlay (phase gtea).
ops.pre_backup ensured the ci-marker repo existed before the backup was taken.
The orchestrator performed the backup (generic tier asserted a snapshot artifact).
This overlay ADDS: the marker repo is present at backup time (backup captured real data).
"""
from __future__ import annotations
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
from harness import generic # noqa: E402
sys.path.insert(0, os.path.dirname(__file__))
from ops import admin_creds, marker_repo_exists # noqa: E402
def test_backup_captures_marker_repo(live_app, meta):
"""The ci-marker repo is present at backup time (backup captures the sqlite3 state)."""
# backupbot cycles the gitea container during backup — wait for it to be back up.
generic.assert_serving(live_app, meta)
user, password = admin_creds(live_app)
assert marker_repo_exists(
live_app, user, password
), f"{live_app}: ci-marker repo is not present at backup time (backup would capture empty state)"