Commit 3de39838 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'ce-to-ee' of gitlab.com:gitlab-org/gitlab-ee into ce-to-ee

parents abc199c5 0ae41e7d
class Geo::BaseRegistry < ActiveRecord::Base
self.abstract_class = true
if Gitlab::Geo.secondary? || Rails.env.test?
if Gitlab::Geo.secondary? || (Rails.env.test? && Rails.configuration.respond_to?(:geo_database))
establish_connection Rails.configuration.geo_database
end
end
......@@ -30,7 +30,10 @@ RSpec.configure do |config|
end
def setup_database_cleaner
DatabaseCleaner[:active_record, { connection: Geo::BaseRegistry }]
if Rails.configuration.respond_to?(:geo_database)
DatabaseCleaner[:active_record, { connection: Geo::BaseRegistry }]
end
DatabaseCleaner[:active_record, { connection: ActiveRecord::Base }]
end
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