Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • castellum castellum
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CastellumCastellum
  • castellumcastellum
  • Merge requests
  • !2089

Test migrations

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Bengfort requested to merge test-migrations into main Oct 20, 2021
  • Overview 2
  • Commits 6
  • Pipelines 3
  • Changes 4

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 Oct 20, 2021 by Bengfort
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: test-migrations