Commit 066610c7 authored by Vladimir Shushlin's avatar Vladimir Shushlin

Don't schedule pages removal if legacy storage is disabled

There is not need in this worker as it only cleans data on
legacy storage
parent 53c37b9b
......@@ -8,7 +8,7 @@ module Pages
DestroyPagesDeploymentsWorker.perform_async(project.id)
PagesRemoveWorker.perform_async(project.id)
PagesRemoveWorker.perform_async(project.id) if Feature.enabled?(:pages_update_legacy_storage, default_enabled: true)
end
end
end
......@@ -24,6 +24,18 @@ RSpec.describe Pages::DeleteService do
expect(project.pages_deployed?).to be(false)
end
it "doesn't remove anything from the legacy storage if updates on it are disabled", :sidekiq_inline do
stub_feature_flags(pages_update_legacy_storage: false)
expect(project.pages_deployed?).to be(true)
expect(PagesWorker).not_to receive(:perform_in)
service.execute
expect(project.pages_deployed?).to be(false)
end
it 'deletes all domains', :sidekiq_inline do
expect(project.pages_domains.count).to eq(1)
......
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