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
a3ec8457
Commit
a3ec8457
authored
Feb 26, 2018
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix backported CE code
parent
afa418e5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/environment.rb
app/models/environment.rb
+2
-2
spec/models/environment_spec.rb
spec/models/environment_spec.rb
+3
-3
No files found.
app/models/environment.rb
View file @
a3ec8457
...
@@ -241,9 +241,9 @@ class Environment < ActiveRecord::Base
...
@@ -241,9 +241,9 @@ class Environment < ActiveRecord::Base
end
end
def
cluster_prometheus_adapter
def
cluster_prometheus_adapter
return
unless
project
.
deployment_platform
.
respond_to?
(
:cluster
)
return
unless
deployment_platform
.
respond_to?
(
:cluster
)
cluster
=
project
.
deployment_platform
.
cluster
cluster
=
deployment_platform
.
cluster
return
unless
cluster
.
application_prometheus
&
.
installed?
return
unless
cluster
.
application_prometheus
&
.
installed?
cluster
.
application_prometheus
cluster
.
application_prometheus
...
...
spec/models/environment_spec.rb
View file @
a3ec8457
...
@@ -493,8 +493,8 @@ describe Environment do
...
@@ -493,8 +493,8 @@ describe Environment do
end
end
it
'returns the metrics from the deployment service'
do
it
'returns the metrics from the deployment service'
do
expect
(
project
.
monitoring_service
)
expect
(
environment
.
prometheus_adapter
)
.
to
receive
(
:
environment_metrics
).
with
(
environment
)
.
to
receive
(
:
query
).
with
(
:environment
,
environment
)
.
and_return
(
:fake_metrics
)
.
and_return
(
:fake_metrics
)
is_expected
.
to
eq
(
:fake_metrics
)
is_expected
.
to
eq
(
:fake_metrics
)
...
...
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