Commit f1456594 authored by Nick Thomas's avatar Nick Thomas

Merge branch...

Merge branch '44696-pages-domain-verification-seems-to-be-struggling-to-scale-to-gitlab-com-levels' into 'master'

Remove remove_disabled_domains feature flag

Closes #44696

See merge request gitlab-org/gitlab-ce!28408
parents 5666c8eb 6bec8cbd
......@@ -5,8 +5,6 @@ class PagesDomainRemovalCronWorker
include CronjobQueue
def perform
return unless Feature.enabled?(:remove_disabled_domains)
PagesDomain.for_removal.find_each do |domain|
domain.destroy!
rescue => e
......
......@@ -9,25 +9,10 @@ describe PagesDomainRemovalCronWorker do
context 'when there is domain which should be removed' do
let!(:domain_for_removal) { create(:pages_domain, :should_be_removed) }
before do
stub_feature_flags(remove_disabled_domains: true)
end
it 'removes domain' do
expect { worker.perform }.to change { PagesDomain.count }.by(-1)
expect(PagesDomain.exists?).to eq(false)
end
context 'when domain removal is disabled' do
before do
stub_feature_flags(remove_disabled_domains: false)
end
it 'does not remove pages domain' do
expect { worker.perform }.not_to change { PagesDomain.count }
expect(PagesDomain.find_by(domain: domain_for_removal.domain)).to be_present
end
end
end
context 'where there is a domain which scheduled for removal in the future' 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