Assert crawl status survives legacy migration

This commit is contained in:
Nick Sweeting 2026-08-13 11:55:07 -07:00
parent 1430aaffe0
commit a5db75fd15
2 changed files with 3 additions and 1 deletions

View File

@ -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",
},
)

View File

@ -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()