Commit a3ec8457 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Fix backported CE code

parent afa418e5
...@@ -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
......
...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment