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
53f92a0a
Commit
53f92a0a
authored
Apr 30, 2021
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the columns order in vulnerability specs
Now select and group statements are taken into account
parent
0152d128
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
ee/spec/graphql/resolvers/vulnerabilities_history_resolver_spec.rb
...raphql/resolvers/vulnerabilities_history_resolver_spec.rb
+9
-9
ee/spec/models/ee/vulnerability_spec.rb
ee/spec/models/ee/vulnerability_spec.rb
+6
-6
No files found.
ee/spec/graphql/resolvers/vulnerabilities_history_resolver_spec.rb
View file @
53f92a0a
...
...
@@ -23,15 +23,15 @@ RSpec.describe Resolvers::VulnerabilitiesHistoryResolver do
ordered_history
=
subject
.
sort_by
{
|
count
|
[
count
[
'day'
],
count
[
'severity'
]]
}
expect
(
ordered_history
.
to_json
).
to
eq
([
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-16'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-16'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-17'
,
'count'
=>
2
},
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-17'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-18'
,
'count'
=>
2
},
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-18'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-19'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-19'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-20'
,
'count'
=>
1
}
{
'
day'
=>
'2019-10-16'
,
'severity'
=>
'critical'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-16'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-17'
,
'severity'
=>
'critical'
,
'count'
=>
2
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-17'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-18'
,
'severity'
=>
'critical'
,
'count'
=>
2
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-18'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-19'
,
'severity'
=>
'critical'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-19'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-20'
,
'severity'
=>
'critical'
,
'count'
=>
1
,
'id'
=>
nil
}
].
to_json
)
end
end
...
...
ee/spec/models/ee/vulnerability_spec.rb
View file @
53f92a0a
...
...
@@ -476,12 +476,12 @@ RSpec.describe Vulnerability do
context
'when there are less than 10 days between the from and to dates'
do
it
'returns the count of unresolved, undismissed vulnerabilities for each severity for each day from the start date to the end date'
do
expect
(
counts_by_day_and_severity
.
order
(
:day
,
:severity
).
to_json
).
to
eq
([
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-26'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-26'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-27'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-27'
,
'count'
=>
2
},
{
'
id'
=>
nil
,
'severity'
=>
'high'
,
'day'
=>
'2019-10-28'
,
'count'
=>
1
},
{
'
id'
=>
nil
,
'severity'
=>
'critical'
,
'day'
=>
'2019-10-28'
,
'count'
=>
2
}
{
'
day'
=>
'2019-10-26'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-26'
,
'severity'
=>
'critical'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-27'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-27'
,
'severity'
=>
'critical'
,
'count'
=>
2
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-28'
,
'severity'
=>
'high'
,
'count'
=>
1
,
'id'
=>
nil
},
{
'
day'
=>
'2019-10-28'
,
'severity'
=>
'critical'
,
'count'
=>
2
,
'id'
=>
nil
}
].
to_json
)
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