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
af5196e9
Commit
af5196e9
authored
Feb 18, 2021
by
Mikołaj Wawrzyniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 1 suggestion(s) to 1 file(s)
parent
a0ca8583
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
spec/lib/gitlab/usage_data_counters/code_review_events_spec.rb
...lib/gitlab/usage_data_counters/code_review_events_spec.rb
+3
-5
No files found.
spec/lib/gitlab/usage_data_counters/code_review_events_spec.rb
View file @
af5196e9
...
...
@@ -5,12 +5,10 @@ require 'spec_helper'
# If this spec fails, we need to add the new code review event to the correct aggregated metric
RSpec
.
describe
'Code review events'
do
it
'the aggregated metrics contain all the code review metrics'
do
wildcard
=
Gitlab
::
Usage
::
Metrics
::
Aggregates
::
AGGREGATED_METRICS_PATH
aggregated_events
=
Dir
[
wildcard
].
each_with_object
([])
do
|
path
,
metrics
|
metrics
.
push
(
*
YAML
.
safe_load
(
File
.
read
(
path
),
aliases:
true
)
&
.
map
(
&
:with_indifferent_access
))
end
path
=
Rails
.
root
.
join
(
'lib/gitlab/usage_data_counters/aggregated_metrics/code_review.yml'
)
aggregated_events
=
YAML
.
safe_load
(
File
.
read
(
path
),
aliases:
true
)
&
.
map
(
&
:with_indifferent_access
)
code_review_aggregated_events
=
aggregated_events
.
select
{
|
event
|
event
[
'name'
].
include?
(
'code_review'
)
}
.
map
{
|
event
|
event
[
'events'
]
}
.
flatten
.
uniq
...
...
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