mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
Assert crawl status survives legacy migration
This commit is contained in:
parent
1430aaffe0
commit
a5db75fd15
@ -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",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@ -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()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user