Skip to content

Test migrations

Bengfort requested to merge test-migrations into main

Fixes #143 (closed)

We recently had to issue a bugfix release because of a faulty migration (see !2086 (merged)). So I looked into ways to test migrations, especially data migrations.

By reverting 5d3e436f I verified that these tests would in fact have detected the issue. However, these tests are slow (make test went from 33s to 48s on my machine) and effectively useless after the release.

I see different options on how to use these tests:

  1. Do not test migrations
  2. Write test locally, but do not commit them
  3. Write tests but exclude them on regular test runs
  4. Write tests but exclude them on regular test runs and always run them in CI
  5. Write tests but remove them after the release
  6. Write tests but skip them after the release
  7. Write tests and keep them

I am leaning slightly towards (3), but not sure.

Edited by Bengfort

Merge request reports