Accept latest backup alias during recovery

This commit is contained in:
Mikei386
2026-09-01 10:43:38 +02:00
parent e30f4f024c
commit 460a9f0207
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -10,6 +10,11 @@ ROOT = Path(__file__).resolve().parents[1]
class RecoveryScriptTests(unittest.TestCase):
def test_latest_alias_points_to_production_backup(self) -> None:
script = (ROOT / "restore.sh").read_text(encoding="utf-8")
self.assertIn("if [[ $ARCHIVE == latest ]]", script)
self.assertIn("ARCHIVE=/data/docker-backups/athena-latest.tar.gz", script)
def _archive(self, members: list[str]) -> Path:
tmp = tempfile.NamedTemporaryFile(suffix=".tar.gz", delete=False)
tmp.close()