Skip to content

Parameterize migration testing by database

Simon Tomlinson requested to merge db-pipeline-run-ci-migrations into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Allows running migration testing against both main and ci databases

One half of solving gitlab-org/database-team/gitlab-com-database-testing#79 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Add some migrations that you'd like to test (Or just revert the latest few migrations from master so they can be run again).
  2. run rails gitlab:db:migration_testing:up[main] or rails gitlab:db:migration_testing:up[ci] to run migrations against either database
  3. Observe files in tmp/migration-testing/{main,ci} depending on which you ran.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Simon Tomlinson

Merge request reports

Loading