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
2a209048
Commit
2a209048
authored
Sep 05, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add EE specific MetricGroup specs
parent
e33e4923
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
ee/spec/lib/ee/gitlab/prometheus/metric_group_spec.rb
ee/spec/lib/ee/gitlab/prometheus/metric_group_spec.rb
+32
-0
No files found.
ee/spec/lib/ee/gitlab/prometheus/metric_group_spec.rb
0 → 100644
View file @
2a209048
# frozen_string_literal: true
require
'rails_helper'
describe
Gitlab
::
Prometheus
::
MetricGroup
do
describe
'.for_project'
do
let!
(
:project_metric
)
{
create
(
:prometheus_metric
)
}
let!
(
:common_metric
)
{
create
(
:prometheus_metric
,
:common
,
group: :aws_elb
)
}
subject
do
described_class
.
for_project
(
project
)
.
map
(
&
:metrics
).
flatten
.
map
(
&
:id
)
end
context
'for current project'
do
let
(
:project
)
{
project_metric
.
project
}
it
'returns metrics for given project and common ones'
do
is_expected
.
to
contain_exactly
(
project_metric
.
id
,
common_metric
.
id
)
end
end
context
'for other project'
do
let
(
:project
)
{
create
(
:project
)
}
it
'returns metrics only common ones'
do
is_expected
.
to
contain_exactly
(
common_metric
.
id
)
end
end
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