Commit df54952a authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'da-remove-specs-fdw-disabled' into 'master'

Geo - Remove unnecessary specs when PostgreSQL FDW is not enabled

See merge request gitlab-org/gitlab-ee!16026
parents 4af27e6d 72e72e28
...@@ -21,14 +21,6 @@ module EE ...@@ -21,14 +21,6 @@ module EE
allow(::Gitlab::Geo).to receive(:secondary?).and_return(true) allow(::Gitlab::Geo).to receive(:secondary?).and_return(true)
end end
def stub_fdw(value)
allow(::Gitlab::Geo::Fdw).to receive(:enabled?).and_return(value)
end
def stub_fdw_disabled
stub_fdw(false)
end
def stub_selective_sync(node, value) def stub_selective_sync(node, value)
allow(node).to receive(:selective_sync?).and_return(value) allow(node).to receive(:selective_sync?).and_return(value)
end end
......
...@@ -13,7 +13,7 @@ describe Geo::RepositoryShardSyncWorker, :geo, :geo_fdw, :clean_gitlab_redis_cac ...@@ -13,7 +13,7 @@ describe Geo::RepositoryShardSyncWorker, :geo, :geo_fdw, :clean_gitlab_redis_cac
stub_current_geo_node(secondary) stub_current_geo_node(secondary)
end end
shared_examples '#perform' do describe '#perform' do
let!(:restricted_group) { create(:group) } let!(:restricted_group) { create(:group) }
let!(:unsynced_project_in_restricted_group) { create(:project, group: restricted_group) } let!(:unsynced_project_in_restricted_group) { create(:project, group: restricted_group) }
...@@ -289,16 +289,4 @@ describe Geo::RepositoryShardSyncWorker, :geo, :geo_fdw, :clean_gitlab_redis_cac ...@@ -289,16 +289,4 @@ describe Geo::RepositoryShardSyncWorker, :geo, :geo_fdw, :clean_gitlab_redis_cac
end end
end end
end end
describe 'when PostgreSQL FDW is available', :geo, :geo_fdw do
it_behaves_like '#perform'
end
describe 'when PostgreSQL FDW is not enabled', :geo do
before do
allow(Gitlab::Geo::Fdw).to receive(:enabled?).and_return(false)
end
it_behaves_like '#perform'
end
end end
...@@ -11,7 +11,6 @@ describe Geo::RepositoryVerification::Secondary::ShardWorker, :geo, :geo_fdw, :r ...@@ -11,7 +11,6 @@ describe Geo::RepositoryVerification::Secondary::ShardWorker, :geo, :geo_fdw, :r
before do before do
stub_current_geo_node(secondary) stub_current_geo_node(secondary)
stub_fdw_disabled
end end
describe '#perform' do describe '#perform' do
......
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