Commit e310120e authored by Sean McGivern's avatar Sean McGivern

Merge branch 'pl-fix-alert-serialization' into 'master'

Fix alert serialization when opening incidents

See merge request gitlab-org/gitlab-ee!10254
parents 99d94583 68168569
......@@ -133,7 +133,7 @@ module Projects
def process_incident_issues
firings.each do |alert|
IncidentManagement::ProcessAlertWorker
.perform_async(project.id, alert)
.perform_async(project.id, alert.to_h)
end
end
......
......@@ -29,16 +29,18 @@ describe Projects::Prometheus::Alerts::NotifyService do
end
end
shared_examples 'processes incident issues' do |amount|
shared_examples 'processes incident issues', :sidekiq do |amount|
let(:create_incident_service) { spy }
it 'processes issues' do
expect(IncidentManagement::ProcessAlertWorker)
.to receive(:perform_async)
.with(project.id, anything)
.with(project.id, kind_of(Hash))
.exactly(amount).times
expect(subject).to eq(true)
Sidekiq::Testing.inline! do
expect(subject).to eq(true)
end
end
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