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
a99ddab6
Commit
a99ddab6
authored
Aug 26, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cover the case when pipeline has multiple scans of same type
parent
baa4de47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
ee/app/models/ee/merge_request.rb
ee/app/models/ee/merge_request.rb
+1
-1
ee/spec/models/merge_request_spec.rb
ee/spec/models/merge_request_spec.rb
+9
-0
No files found.
ee/app/models/ee/merge_request.rb
View file @
a99ddab6
...
...
@@ -260,7 +260,7 @@ module EE
def
missing_security_scan_types
return
[]
unless
actual_head_pipeline
&&
base_pipeline
base_pipeline
.
security_scans
.
pluck
(
:scan_type
)
-
actual_head_pipeline
.
security_scans
.
pluck
(
:scan_type
)
(
base_pipeline
.
security_scans
.
pluck
(
:scan_type
)
-
actual_head_pipeline
.
security_scans
.
pluck
(
:scan_type
)).
uniq
end
private
...
...
ee/spec/models/merge_request_spec.rb
View file @
a99ddab6
...
...
@@ -975,6 +975,15 @@ RSpec.describe MergeRequest do
end
it
{
is_expected
.
to
eq
([
'sast'
])
}
context
'when there are multiple scans for the same type for base pipeline'
do
before
do
build
=
create
(
:ci_build
,
:success
,
pipeline:
base_pipeline
,
project:
project
)
create
(
:security_scan
,
build:
build
,
scan_type:
'sast'
)
end
it
{
is_expected
.
to
eq
([
'sast'
])
}
end
end
end
end
...
...
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