Make sure migration tests could run even if geo is not setup in EE
For now we can't run tests like: rspec spec/migrations/update_authorized_keys_file_spec.rb
in EE if geo database is not setup.
The following discussion from !13152 (merged) should be addressed:
-
@godfat started a discussion: (+5 comments) Umm... looks like this might force us setup geo database in EE test? Discovered in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2589 job https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/28149500
Could you run
spec/migrations/update_authorized_keys_file_spec.rb
locally without geo setup?From
app/models/geo/base_registry.rb
class Geo::BaseRegistry < ActiveRecord::Base def self.connection raise 'Geo secondary database is not configured' unless Gitlab::Geo.geo_database_configured? super end end