Skip to content
Snippets Groups Projects

Move findings deletion into a worker using pub-sub system for `Ci::JobArtifacts::DestroyBatchService`

Merged Subashis Chakraborty requested to merge 346236-destroy-security-findings into master
Files
3
@@ -16,6 +16,23 @@
expect { subject }.to change { Ci::JobArtifact.count }.by(-1)
end
context 'Ci::JobArtifactsDeletedEvent' do
let(:event_data) { { job_ids: [artifact.job_id] } }
it 'is published' do
event = double(:event)
expect(Ci::JobArtifactsDeletedEvent)
.to receive(:new)
.with(data: event_data)
.and_return(event)
expect(Gitlab::EventStore).to receive(:publish).with(event)
subject
end
end
context 'with Geo replication' do
let_it_be(:primary) { create(:geo_node, :primary) }
let_it_be(:secondary) { create(:geo_node) }
Loading