test(T4): extend migration tests to cover all schema versions up to v24 #32

Merged
guettlibot merged 1 commits from task/t4-migration-tests into main 2026-05-14 03:09:16 +00:00
guettlibot commented 2026-05-14 03:01:22 +00:00 (Migrated from codeberg.org)

Summary

  • Updates test/unit/migration_test.dart from 2 tests (v1→v22, fresh install) to 4 tests
  • schemaVersion assertion: hard-codes the expected value (24) so any future bump without a test update fails immediately
  • v1 → latest: existing test expanded to also assert columns added in v23 (list_unsubscribe_header) and v24 (imap_server_id), plus all new tables from v4–v21
  • v22 → latest: new test that builds a minimal v22 schema with raw SQL and asserts the v23/v24 migration steps execute correctly
  • fresh install: existing test extended to verify all 12 tables and the two new columns exist after schema creation

Test plan

  • task check-fast passes (dart format + analyze + 273 tests green)
  • All 4 migration tests pass in isolation
## Summary - Updates `test/unit/migration_test.dart` from 2 tests (v1→v22, fresh install) to 4 tests - **schemaVersion assertion**: hard-codes the expected value (24) so any future bump without a test update fails immediately - **v1 → latest**: existing test expanded to also assert columns added in v23 (`list_unsubscribe_header`) and v24 (`imap_server_id`), plus all new tables from v4–v21 - **v22 → latest**: new test that builds a minimal v22 schema with raw SQL and asserts the v23/v24 migration steps execute correctly - **fresh install**: existing test extended to verify all 12 tables and the two new columns exist after schema creation ## Test plan - [x] `task check-fast` passes (dart format + analyze + 273 tests green) - [x] All 4 migration tests pass in isolation
Sign in to join this conversation.