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
ca7f2dc3
Commit
ca7f2dc3
authored
Jul 17, 2020
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Batch fix specs
parent
6e676c4c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
ee/spec/lib/gitlab/ci/reports/security/reports_spec.rb
ee/spec/lib/gitlab/ci/reports/security/reports_spec.rb
+1
-1
ee/spec/models/vulnerabilities/scanner_spec.rb
ee/spec/models/vulnerabilities/scanner_spec.rb
+1
-1
ee/spec/requests/security/vulnerability_findings_spec.rb
ee/spec/requests/security/vulnerability_findings_spec.rb
+1
-1
ee/spec/services/security/store_report_service_spec.rb
ee/spec/services/security/store_report_service_spec.rb
+1
-1
ee/spec/support/shared_examples/controllers/concerns/project_vulnerability_findings_actions_shared_examples.rb
...project_vulnerability_findings_actions_shared_examples.rb
+1
-1
No files found.
ee/spec/lib/gitlab/ci/reports/security/reports_spec.rb
View file @
ca7f2dc3
...
...
@@ -55,7 +55,7 @@ RSpec.describe Gitlab::Ci::Reports::Security::Reports do
context
"when none of the reports have a high severity vulnerability"
do
before
do
subject
.
get_report
(
'sast'
,
artifact
).
finding
(
low_severity
)
subject
.
get_report
(
'sast'
,
artifact
).
add_
finding
(
low_severity
)
subject
.
get_report
(
'sast'
,
artifact
).
add_finding
(
low_severity
)
subject
.
get_report
(
'dependency_scanning'
,
artifact
).
add_finding
(
low_severity
)
end
...
...
ee/spec/models/vulnerabilities/scanner_spec.rb
View file @
ca7f2dc3
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Vulnerabilities
::
Scanner
do
describe
'associations'
do
it
{
is_expected
.
to
have_many
(
:findings
).
class_name
(
'Vulnerabilities::Finding'
)
.
with_foreign_key
(
'occurrence_id'
)
}
it
{
is_expected
.
to
have_many
(
:findings
).
class_name
(
'Vulnerabilities::Finding'
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
...
...
ee/spec/requests/security/vulnerability_findings_spec.rb
View file @
ca7f2dc3
...
...
@@ -40,7 +40,7 @@ RSpec.describe 'GET /-/security/vulnerability_findings' do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
json_response
.
length
).
to
eq
2
expect
(
json_response
.
first
[
'id'
]).
to
be
(
critical_vulnerability
.
id
)
expect
(
response
).
to
match_response_schema
(
'vulnerabilities/
occurrence
_list'
,
dir:
'ee'
)
expect
(
response
).
to
match_response_schema
(
'vulnerabilities/
finding
_list'
,
dir:
'ee'
)
end
context
'when a specific page is requested'
do
...
...
ee/spec/services/security/store_report_service_spec.rb
View file @
ca7f2dc3
...
...
@@ -62,7 +62,7 @@ RSpec.describe Security::StoreReportService, '#execute' do
before
do
allow
(
Gitlab
::
ErrorTracking
).
to
receive
(
:track_and_raise_exception
).
and_call_original
report
.
finding
(
finding_without_name
)
report
.
add_
finding
(
finding_without_name
)
end
it
'raises invalid record error'
do
...
...
ee/spec/support/shared_examples/controllers/concerns/project_vulnerability_findings_actions_shared_examples.rb
View file @
ca7f2dc3
...
...
@@ -40,7 +40,7 @@ RSpec.shared_examples ProjectVulnerabilityFindingsActions do
end
expect
(
json_response
.
first
[
'blob_path'
]).
to
eq
(
blob_path
)
expect
(
response
).
to
match_response_schema
(
'vulnerabilities/
occurrence
_list'
,
dir:
'ee'
)
expect
(
response
).
to
match_response_schema
(
'vulnerabilities/
finding
_list'
,
dir:
'ee'
)
end
context
'when a specific page is requested'
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