Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bd27f049
Commit
bd27f049
authored
May 11, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ProcessAlertWorker to use AppLogger
parent
baa0c3d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/workers/incident_management/process_alert_worker.rb
app/workers/incident_management/process_alert_worker.rb
+1
-1
spec/workers/incident_management/process_alert_worker_spec.rb
.../workers/incident_management/process_alert_worker_spec.rb
+3
-3
No files found.
app/workers/incident_management/process_alert_worker.rb
View file @
bd27f049
...
...
@@ -35,7 +35,7 @@ module IncidentManagement
return
if
alert
.
update
(
issue_id:
issue_id
)
Gitlab
::
Git
Logger
.
warn
(
Gitlab
::
App
Logger
.
warn
(
message:
'Cannot link an Issue with Alert'
,
issue_id:
issue_id
,
alert_id:
alert_id
,
...
...
spec/workers/incident_management/process_alert_worker_spec.rb
View file @
bd27f049
...
...
@@ -54,7 +54,7 @@ describe IncidentManagement::ProcessAlertWorker do
.
with
(
alert_management_alert_id
)
.
and_return
(
alert
)
allow
(
Gitlab
::
Git
Logger
).
to
receive
(
:warn
).
and_call_original
allow
(
Gitlab
::
App
Logger
).
to
receive
(
:warn
).
and_call_original
end
context
'when alert can be updated'
do
...
...
@@ -65,7 +65,7 @@ describe IncidentManagement::ProcessAlertWorker do
it
'does not write a warning to log'
do
subject
expect
(
Gitlab
::
Git
Logger
).
not_to
have_received
(
:warn
)
expect
(
Gitlab
::
App
Logger
).
not_to
have_received
(
:warn
)
end
end
...
...
@@ -83,7 +83,7 @@ describe IncidentManagement::ProcessAlertWorker do
it
'writes a worning to log'
do
subject
expect
(
Gitlab
::
Git
Logger
).
to
have_received
(
:warn
).
with
(
expect
(
Gitlab
::
App
Logger
).
to
have_received
(
:warn
).
with
(
message:
'Cannot link an Issue with Alert'
,
issue_id:
new_issue
.
id
,
alert_id:
alert_management_alert_id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment