Commit 19031b99 authored by Jarka Košanová's avatar Jarka Košanová

Merge branch 'update-process-alert-worker-to-use-app-logger' into 'master'

Update ProcessAlertWorker to use AppLogger

See merge request gitlab-org/gitlab!31595
parents e7904461 bd27f049
...@@ -35,7 +35,7 @@ module IncidentManagement ...@@ -35,7 +35,7 @@ module IncidentManagement
return if alert.update(issue_id: issue_id) return if alert.update(issue_id: issue_id)
Gitlab::GitLogger.warn( Gitlab::AppLogger.warn(
message: 'Cannot link an Issue with Alert', message: 'Cannot link an Issue with Alert',
issue_id: issue_id, issue_id: issue_id,
alert_id: alert_id, alert_id: alert_id,
......
...@@ -54,7 +54,7 @@ describe IncidentManagement::ProcessAlertWorker do ...@@ -54,7 +54,7 @@ describe IncidentManagement::ProcessAlertWorker do
.with(alert_management_alert_id) .with(alert_management_alert_id)
.and_return(alert) .and_return(alert)
allow(Gitlab::GitLogger).to receive(:warn).and_call_original allow(Gitlab::AppLogger).to receive(:warn).and_call_original
end end
context 'when alert can be updated' do context 'when alert can be updated' do
...@@ -65,7 +65,7 @@ describe IncidentManagement::ProcessAlertWorker do ...@@ -65,7 +65,7 @@ describe IncidentManagement::ProcessAlertWorker do
it 'does not write a warning to log' do it 'does not write a warning to log' do
subject subject
expect(Gitlab::GitLogger).not_to have_received(:warn) expect(Gitlab::AppLogger).not_to have_received(:warn)
end end
end end
...@@ -83,7 +83,7 @@ describe IncidentManagement::ProcessAlertWorker do ...@@ -83,7 +83,7 @@ describe IncidentManagement::ProcessAlertWorker do
it 'writes a worning to log' do it 'writes a worning to log' do
subject subject
expect(Gitlab::GitLogger).to have_received(:warn).with( expect(Gitlab::AppLogger).to have_received(:warn).with(
message: 'Cannot link an Issue with Alert', message: 'Cannot link an Issue with Alert',
issue_id: new_issue.id, issue_id: new_issue.id,
alert_id: alert_management_alert_id, alert_id: alert_management_alert_id,
......
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