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
5e0f3f77
Commit
5e0f3f77
authored
Apr 26, 2021
by
Mikołaj Wawrzyniak
Committed by
Rajendra Kadam
Apr 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 3 suggestion(s) to 1 file(s)
parent
f199ac77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/lib/gitlab/usage/metrics/aggregates/aggregate_spec.rb
spec/lib/gitlab/usage/metrics/aggregates/aggregate_spec.rb
+3
-3
No files found.
spec/lib/gitlab/usage/metrics/aggregates/aggregate_spec.rb
View file @
5e0f3f77
...
...
@@ -81,7 +81,7 @@ RSpec.describe Gitlab::Usage::Metrics::Aggregates::Aggregate, :clean_gitlab_redi
end
context
'with OR operator'
do
let
(
:operator
)
{
'OR'
}
let
(
:operator
)
{
Gitlab
::
Usage
::
Metrics
::
Aggregates
::
UNION_OF_AGGREGATED_METRICS
}
it
'returns the number of unique events occurred for any metric in aggregate'
,
:aggregate_failures
do
expect
(
namespace
::
SOURCES
[
datasource
]).
to
receive
(
:calculate_metrics_union
).
with
(
params
.
merge
(
metric_names:
%w[event1 event2 event3]
)).
and_return
(
5
)
...
...
@@ -90,9 +90,9 @@ RSpec.describe Gitlab::Usage::Metrics::Aggregates::Aggregate, :clean_gitlab_redi
end
context
'with AND operator'
do
let
(
:operator
)
{
'AND'
}
let
(
:operator
)
{
Gitlab
::
Usage
::
Metrics
::
Aggregates
::
INTERSECTION_OF_AGGREGATED_METRICS
}
it
'returns the number of unique events
occurred for any metric in
aggregate'
,
:aggregate_failures
do
it
'returns the number of unique events
that occurred for all of metrics in the
aggregate'
,
:aggregate_failures
do
expect
(
namespace
::
SOURCES
[
datasource
]).
to
receive
(
:calculate_metrics_intersections
).
with
(
params
.
merge
(
metric_names:
%w[event1 event2 event3]
)).
and_return
(
5
)
expect
(
aggregated_metrics_data
).
to
eq
(
results
)
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