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
19f2d1bb
Commit
19f2d1bb
authored
Nov 05, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add all missing report types
parent
71601000
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
14 deletions
+33
-14
ee/spec/factories/ci/builds.rb
ee/spec/factories/ci/builds.rb
+1
-1
ee/spec/factories/ci/job_artifacts.rb
ee/spec/factories/ci/job_artifacts.rb
+30
-0
ee/spec/serializers/merge_request_widget_entity_spec.rb
ee/spec/serializers/merge_request_widget_entity_spec.rb
+2
-13
No files found.
ee/spec/factories/ci/builds.rb
View file @
19f2d1bb
...
...
@@ -6,7 +6,7 @@ FactoryBot.define do
failure_reason
{
Ci
::
Build
.
failure_reasons
[
:protected_environment_failure
]
}
end
%i[sast performance license_management]
.
each
do
|
report_type
|
%i[sast
codequality dependency_scanning container_scanning dast
performance license_management]
.
each
do
|
report_type
|
trait
"legacy_
#{
report_type
}
"
.
to_sym
do
success
artifacts
...
...
ee/spec/factories/ci/job_artifacts.rb
View file @
19f2d1bb
...
...
@@ -41,5 +41,35 @@ FactoryBot.define do
Rails
.
root
.
join
(
'spec/fixtures/trace/sample_trace'
),
'text/plain'
)
end
end
trait
:dependency_scanning
do
file_format
:raw
file_type
:dependency_scanning
after
(
:build
)
do
|
artifact
,
_
|
artifact
.
file
=
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/security-reports/master/gl-dependency-scanning-report.json'
),
'text/plain'
)
end
end
trait
:container_scanning
do
file_format
:raw
file_type
:container_scanning
after
(
:build
)
do
|
artifact
,
_
|
artifact
.
file
=
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/security-reports/master/gl-container-scanning-report.json'
),
'text/plain'
)
end
end
trait
:dast
do
file_format
:raw
file_type
:dast
after
(
:build
)
do
|
artifact
,
_
|
artifact
.
file
=
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/security-reports/master/gl-dast-report.json'
),
'text/plain'
)
end
end
end
end
ee/spec/serializers/merge_request_widget_entity_spec.rb
View file @
19f2d1bb
...
...
@@ -58,8 +58,7 @@ describe MergeRequestWidgetEntity do
context
"with new report artifacts"
do
before
do
job
=
create
(
:ci_build
,
pipeline:
pipeline
)
create
(
:ci_job_artifact
,
file_type:
artifact_type
,
file_format:
Ci
::
JobArtifact
::
TYPE_AND_FORMAT_PAIRS
[
artifact_type
],
job:
job
)
create
(
:ee_ci_build
,
artifact_type
,
pipeline:
pipeline
)
end
it
"has data entry"
do
...
...
@@ -69,17 +68,7 @@ describe MergeRequestWidgetEntity do
context
"with legacy report artifacts"
do
before
do
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
,
name:
artifact_type
,
options:
{
artifacts:
{
paths:
[
Ci
::
JobArtifact
::
DEFAULT_FILE_NAMES
[
artifact_type
]]
}
}
)
create
(
:ee_ci_build
,
:"legacy_
#{
artifact_type
}
"
,
pipeline:
pipeline
)
end
it
"has data entry"
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