Commit 3c12abe8 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'fix_background_migration_helpers_spec_decomposed' into 'master'

Use using_connection similar to how JobCoordinator does it

See merge request gitlab-org/gitlab!80351
parents 0b624241 99776803
......@@ -439,6 +439,12 @@ RSpec.describe Gitlab::Database::Migrations::BackgroundMigrationHelpers do
end
context 'when the migration is running against the ci database', if: Gitlab::Database.has_config?(:ci) do
around do |example|
Gitlab::Database::SharedModel.using_connection(::Ci::ApplicationRecord.connection) do
example.run
end
end
it_behaves_like 'helpers that enqueue background migrations', BackgroundMigration::CiDatabaseWorker, 'ci'
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment