summaryrefslogtreecommitdiff
path: root/spec/support/helpers/migrations_helpers.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-05 03:09:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-05 03:09:46 +0000
commit6cb2a797bf152af1f6627cde7876871831b9c639 (patch)
treeb34ff67013f7fc1bfab478b548b7c1a664eb7725 /spec/support/helpers/migrations_helpers.rb
parent86af4d6a04a1c30ebfe2377cdc3270ade911b2fe (diff)
downloadgitlab-ce-6cb2a797bf152af1f6627cde7876871831b9c639.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/helpers/migrations_helpers.rb')
-rw-r--r--spec/support/helpers/migrations_helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/helpers/migrations_helpers.rb b/spec/support/helpers/migrations_helpers.rb
index e1d28a807e3..6fc5904fc83 100644
--- a/spec/support/helpers/migrations_helpers.rb
+++ b/spec/support/helpers/migrations_helpers.rb
@@ -104,7 +104,7 @@ module MigrationsHelpers
# We stub this way because we can't stub on
# `current_application_settings` due to `method_missing` is
# depending on current_application_settings...
- allow(ActiveRecord::Base.connection)
+ allow(Gitlab::Database::Migration::V1_0::MigrationRecord.connection)
.to receive(:active?)
.and_return(false)
allow(Gitlab::Runtime)
@@ -158,10 +158,10 @@ module MigrationsHelpers
end
def migrate!
- open_transactions = ActiveRecord::Base.connection.open_transactions
+ open_transactions = Gitlab::Database::Migration::V1_0::MigrationRecord.connection.open_transactions
allow_next_instance_of(described_class) do |migration|
allow(migration).to receive(:transaction_open?) do
- ActiveRecord::Base.connection.open_transactions > open_transactions
+ Gitlab::Database::Migration::V1_0::MigrationRecord.connection.open_transactions > open_transactions
end
end