Commit d76c5e68 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'pl-alert-management-remove-last-ff' into 'master'

Remove remaining FF alert_management_minimal

See merge request gitlab-org/gitlab!32412
parents 9306f33f 4c98ec27
......@@ -117,8 +117,6 @@ module Projects
end
def process_prometheus_alerts
return unless Feature.enabled?(:alert_management_minimal, project)
alerts.each do |alert|
AlertManagement::ProcessPrometheusAlertService
.new(project, nil, alert.to_h)
......
......@@ -225,37 +225,18 @@ describe Projects::Prometheus::Alerts::NotifyService do
create(:project_alerting_setting, project: project, token: token)
end
context 'when alert_management_minimal feature enabled' do
before do
stub_feature_flags(alert_management_minimal: true)
end
context 'with multiple firing alerts and resolving alerts' do
let(:payload_raw) do
payload_for(firing: [alert_firing, alert_firing], resolved: [alert_resolved])
end
it 'processes Prometheus alerts' do
expect(AlertManagement::ProcessPrometheusAlertService)
.to receive(:new)
.with(project, nil, kind_of(Hash))
.exactly(3).times
.and_return(process_service)
expect(process_service).to receive(:execute).exactly(3).times
subject
end
end
end
context 'when alert_management_minimal feature disabled' do
before do
stub_feature_flags(alert_management_minimal: false)
context 'with multiple firing alerts and resolving alerts' do
let(:payload_raw) do
payload_for(firing: [alert_firing, alert_firing], resolved: [alert_resolved])
end
it 'does not process Prometheus alerts' do
it 'processes Prometheus alerts' do
expect(AlertManagement::ProcessPrometheusAlertService)
.not_to receive(:new)
.to receive(:new)
.with(project, nil, kind_of(Hash))
.exactly(3).times
.and_return(process_service)
expect(process_service).to receive(:execute).exactly(3).times
subject
end
......
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