From a5db75fd1572bcc887f4e55ecf61a946bc33b879 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 13 Aug 2026 11:55:07 -0700 Subject: [PATCH] Assert crawl status survives legacy migration --- archivebox/tests/migrations_helpers.py | 1 + archivebox/tests/test_migrations_08_to_09.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/archivebox/tests/migrations_helpers.py b/archivebox/tests/migrations_helpers.py index 75f8358f..383a6a95 100644 --- a/archivebox/tests/migrations_helpers.py +++ b/archivebox/tests/migrations_helpers.py @@ -990,6 +990,7 @@ def seed_0_8_data(db_path: Path) -> dict[str, list[dict]]: "urls": uri, "max_depth": max_depth, "label": "", + "status": "queued", }, ) diff --git a/archivebox/tests/test_migrations_08_to_09.py b/archivebox/tests/test_migrations_08_to_09.py index 02bcbd0d..ca361787 100644 --- a/archivebox/tests/test_migrations_08_to_09.py +++ b/archivebox/tests/test_migrations_08_to_09.py @@ -667,11 +667,12 @@ def test_crawl_data_preserved_after_migration(migration_08_data): # Check each crawl's data is preserved for crawl in original_data["crawls"]: - cursor.execute("SELECT urls, label FROM crawls_crawl WHERE id = ?", (crawl["id"],)) + cursor.execute("SELECT urls, label, status FROM crawls_crawl WHERE id = ?", (crawl["id"],)) row = cursor.fetchone() assert row is not None, f"Crawl {crawl['id']} not found after migration" assert row[0] == crawl["urls"], f"URLs mismatch for crawl {crawl['id']}" assert row[1] == crawl["label"], f"Label mismatch for crawl {crawl['id']}" + assert row[2] == crawl["status"], f"Status mismatch for crawl {crawl['id']}" conn.close()