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
0d9b4046
Commit
0d9b4046
authored
Apr 19, 2021
by
Thiago Figueiró
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MergeReportsService spec for location deduplication
parent
6853eeb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
ee/spec/services/security/merge_reports_service_spec.rb
ee/spec/services/security/merge_reports_service_spec.rb
+10
-1
No files found.
ee/spec/services/security/merge_reports_service_spec.rb
View file @
0d9b4046
...
...
@@ -40,6 +40,15 @@ RSpec.describe Security::MergeReportsService, '#execute' do
)
end
let
(
:finding_id_2_loc_1_extra
)
do
build
(
:ci_reports_security_finding
,
identifiers:
[
identifier_2_primary
,
identifier_2_cve
],
location:
build
(
:ci_reports_security_locations_sast
,
start_line:
32
,
end_line:
34
),
scanner:
scanner_2
,
severity: :medium
)
end
let
(
:finding_id_2_loc_2
)
do
build
(
:ci_reports_security_finding
,
identifiers:
[
identifier_2_primary
,
identifier_2_cve
],
...
...
@@ -81,7 +90,7 @@ RSpec.describe Security::MergeReportsService, '#execute' do
)
end
let
(
:report_1_findings
)
{
[
finding_id_1
,
finding_id_2_loc_1
,
finding_cwe_2
,
finding_wasc_1
]
}
let
(
:report_1_findings
)
{
[
finding_id_1
,
finding_id_2_loc_1
,
finding_
id_2_loc_1_extra
,
finding_
cwe_2
,
finding_wasc_1
]
}
let
(
:scanned_resource
)
do
::
Gitlab
::
Ci
::
Reports
::
Security
::
ScannedResource
.
new
(
URI
.
parse
(
'example.com'
),
'GET'
)
...
...
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