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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
b243c3ea
Commit
b243c3ea
authored
Aug 01, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give metric query context rspec examples correctly sounding names. + missing whitespace
parent
6232543d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/gitlab/prometheus/queries/query_additional_metrics.rb
lib/gitlab/prometheus/queries/query_additional_metrics.rb
+1
-0
spec/support/prometheus/additional_metrics_shared_examples.rb
.../support/prometheus/additional_metrics_shared_examples.rb
+2
-2
No files found.
lib/gitlab/prometheus/queries/query_additional_metrics.rb
View file @
b243c3ea
...
...
@@ -51,6 +51,7 @@ module Gitlab
query
[
:query
]
%=
context
client_query
(
query
[
:query
],
time:
context
[
:timeframe_end
])
end
query
[
:result
]
=
result
&
.
map
(
&
:deep_symbolize_keys
)
query
end
...
...
spec/support/prometheus/additional_metrics_shared_examples.rb
View file @
b243c3ea
...
...
@@ -23,13 +23,13 @@ RSpec.shared_examples 'additional metrics query' do
subject!
{
described_class
.
new
(
client
)
}
shared_examples
'query context containing environment slug and filter'
do
it
'
query context
contains ci_environment_slug'
do
it
'contains ci_environment_slug'
do
expect
(
subject
).
to
receive
(
:query_metrics
).
with
(
hash_including
(
ci_environment_slug:
environment
.
slug
))
subject
.
query
(
*
query_params
)
end
it
'
query context
contains environment filter'
do
it
'contains environment filter'
do
expect
(
subject
).
to
receive
(
:query_metrics
).
with
(
hash_including
(
environment_filter:
"container_name!=
\"
POD
\"
,environment=
\"
#{
environment
.
slug
}
\"
"
...
...
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