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
1cc2ff17
Commit
1cc2ff17
authored
Jul 17, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Never show error when a non fingerprinted alert
- Add specs to test fix
parent
08963142
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app/services/alert_management/alerts/update_service.rb
app/services/alert_management/alerts/update_service.rb
+2
-0
spec/services/alert_management/alerts/update_service_spec.rb
spec/services/alert_management/alerts/update_service_spec.rb
+13
-0
No files found.
app/services/alert_management/alerts/update_service.rb
View file @
1cc2ff17
...
...
@@ -150,6 +150,8 @@ module AlertManagement
end
def
duplicate_alert?
return
if
alert
.
fingerprint
.
blank?
open_alerts
.
any?
&&
open_alerts
.
exclude?
(
alert
)
end
...
...
spec/services/alert_management/alerts/update_service_spec.rb
View file @
1cc2ff17
...
...
@@ -209,6 +209,19 @@ RSpec.describe AlertManagement::Alerts::UpdateService do
expect
(
response
).
to
be_error
expect
(
response
.
message
).
to
eq
(
message
)
end
context
'fingerprints are blank'
do
let_it_be
(
:alert
)
{
create
(
:alert_management_alert
,
:resolved
,
project:
project
,
fingerprint:
nil
)
}
let_it_be
(
:existing_alert
)
{
create
(
:alert_management_alert
,
:triggered
,
fingerprint:
alert
.
fingerprint
,
project:
project
)
}
it
'successfully changes the status'
do
expect
{
response
}.
to
change
{
alert
.
acknowledged?
}.
to
(
true
)
expect
(
response
).
to
be_success
expect
(
response
.
payload
[
:alert
]).
to
eq
(
alert
)
end
it_behaves_like
'adds a system note'
end
end
context
'two existing closed alerts'
do
...
...
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