feat: B2 uit voor veilige archive-downloads

This commit is contained in:
kodi
2026-03-14 14:24:52 +01:00
parent 592b10acc2
commit d463b3977d
24 changed files with 754 additions and 195 deletions
@@ -241,6 +241,28 @@ class TasksApiGoldenTest(unittest.TestCase):
self.assertEqual(body["error_code"], "io_error")
self.assertEqual(body["error_message"], "write failed")
def test_get_task_detail_ready_archive_download(self) -> None:
self._insert_task(
task_id="task-download-ready",
operation="download",
status="ready",
source="storage1/docs",
destination="docs.zip",
created_at="2026-03-10T10:00:00Z",
started_at="2026-03-10T10:00:01Z",
finished_at="2026-03-10T10:00:05Z",
done_items=1,
total_items=1,
)
response = self._get("/api/tasks/task-download-ready")
self.assertEqual(response.status_code, 200)
body = response.json()
self.assertEqual(body["operation"], "download")
self.assertEqual(body["status"], "ready")
self.assertEqual(body["destination"], "docs.zip")
def test_get_task_not_found(self) -> None:
response = self._get("/api/tasks/task-missing")