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
Boxiang Sun
gitlab-ce
Commits
9817124f
Commit
9817124f
authored
Apr 02, 2019
by
rpereira2
Committed by
Peter Leitzen
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start context names with lowercase letter
parent
f71d243a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
spec/services/prometheus/proxy_service_spec.rb
spec/services/prometheus/proxy_service_spec.rb
+7
-7
No files found.
spec/services/prometheus/proxy_service_spec.rb
View file @
9817124f
...
...
@@ -32,7 +32,7 @@ describe Prometheus::ProxyService do
subject
{
described_class
.
new
(
environment
,
'GET'
,
'query'
,
{
query:
'1'
})
}
context
'
W
hen prometheus_adapter is nil'
do
context
'
w
hen prometheus_adapter is nil'
do
before
do
allow
(
environment
).
to
receive
(
:prometheus_adapter
).
and_return
(
nil
)
end
...
...
@@ -46,7 +46,7 @@ describe Prometheus::ProxyService do
end
end
context
'
W
hen prometheus_adapter cannot query'
do
context
'
w
hen prometheus_adapter cannot query'
do
before
do
allow
(
environment
).
to
receive
(
:prometheus_adapter
).
and_return
(
prometheus_adapter
)
allow
(
prometheus_adapter
).
to
receive
(
:can_query?
).
and_return
(
false
)
...
...
@@ -61,7 +61,7 @@ describe Prometheus::ProxyService do
end
end
context
'
C
annot proxy'
do
context
'
c
annot proxy'
do
subject
{
described_class
.
new
(
environment
,
'POST'
,
'query'
,
{
query:
'1'
})
}
it
'returns error'
do
...
...
@@ -72,7 +72,7 @@ describe Prometheus::ProxyService do
end
end
context
'
W
hen cached'
,
:use_clean_rails_memory_store_caching
do
context
'
w
hen cached'
,
:use_clean_rails_memory_store_caching
do
let
(
:return_value
)
{
{
'http_status'
=>
200
,
'body'
=>
'body'
}
}
let
(
:opts
)
{
[
environment
.
class
.
name
,
environment
.
id
,
'GET'
,
'query'
,
{
query:
'1'
}]
}
...
...
@@ -92,7 +92,7 @@ describe Prometheus::ProxyService do
end
end
context
'
W
hen not cached'
do
context
'
w
hen not cached'
do
let
(
:return_value
)
{
{
'http_status'
=>
200
,
'body'
=>
'body'
}
}
let
(
:opts
)
{
[
environment
.
class
.
name
,
environment
.
id
,
'GET'
,
'query'
,
{
query:
'1'
}]
}
...
...
@@ -113,7 +113,7 @@ describe Prometheus::ProxyService do
end
end
context
'
C
all prometheus api'
do
context
'
c
all prometheus api'
do
let
(
:prometheus_client
)
{
instance_double
(
Gitlab
::
PrometheusClient
)
}
before
do
...
...
@@ -126,7 +126,7 @@ describe Prometheus::ProxyService do
.
and_return
(
prometheus_client
)
end
context
'
C
onnection to prometheus server succeeds'
do
context
'
c
onnection to prometheus server succeeds'
do
let
(
:rest_client_response
)
{
instance_double
(
RestClient
::
Response
)
}
let
(
:prometheus_http_status_code
)
{
400
}
...
...
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