Skip to content
Snippets Groups Projects
Verified Commit 96998d31 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC :two:
Browse files

Remove purge_stale_security_findings feature flag

Changelog: other
EE: true
parent 01964f1d
No related branches found
No related tags found
1 merge request!106166Remove purge_stale_security_findings feature flag
---
name: purge_stale_security_findings
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/81423
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/356464
milestone: '14.9'
type: ops
group: group::threat insights
default_enabled: true
......@@ -12,8 +12,6 @@ class PurgeWorker
idempotent!
def perform
return unless Feature.enabled?(:purge_stale_security_findings, type: :ops)
::Security::PurgeScansService.purge_stale_records
end
end
......
......@@ -8,28 +8,12 @@
before do
allow(::Security::PurgeScansService).to receive(:purge_stale_records)
stub_feature_flags(purge_stale_security_findings: feature_enabled?)
end
context 'when the `purge_stale_security_findings` feature is disabled' do
let(:feature_enabled?) { false }
it 'does not initiate the mark as purged job' do
perform
expect(::Security::PurgeScansService).not_to have_received(:purge_stale_records)
end
end
context 'when the `purge_stale_security_findings` feature is enabled' do
let(:feature_enabled?) { true }
it 'initiates the mark as purged job' do
perform
it 'delegates the call to PurgeScansService' do
perform
expect(::Security::PurgeScansService).to have_received(:purge_stale_records)
end
expect(::Security::PurgeScansService).to have_received(:purge_stale_records)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment