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
e3ba6d9c
Commit
e3ba6d9c
authored
Dec 21, 2020
by
Can Eldem
Committed by
Igor Drozdov
Dec 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip filtering by domain if iid is given
parent
bd0dab96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
app/finders/alert_management/alerts_finder.rb
app/finders/alert_management/alerts_finder.rb
+2
-0
spec/finders/alert_management/alerts_finder_spec.rb
spec/finders/alert_management/alerts_finder_spec.rb
+6
-0
No files found.
app/finders/alert_management/alerts_finder.rb
View file @
e3ba6d9c
...
...
@@ -32,6 +32,8 @@ module AlertManagement
attr_reader
:current_user
,
:project
,
:params
def
by_domain
(
collection
)
return
collection
if
params
[
:iid
].
present?
collection
.
with_operations_alerts
end
...
...
spec/finders/alert_management/alerts_finder_spec.rb
View file @
e3ba6d9c
...
...
@@ -42,6 +42,12 @@ RSpec.describe AlertManagement::AlertsFinder, '#execute' do
it
{
is_expected
.
to
contain_exactly
(
resolved_alert
,
ignored_alert
)
}
end
context
'skips domain if iid is given'
do
let
(
:params
)
{
{
iid:
resolved_alert
.
iid
,
domain:
'threat_monitoring'
}
}
it
{
is_expected
.
to
contain_exactly
(
resolved_alert
)
}
end
end
context
'empty params'
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