diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-07 02:36:59 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-07 02:38:52 +0200 |
commit | a7e1205219387a6d24c8579994f73a33b3028010 (patch) | |
tree | 6b0c2398d0f13d8b156eb8f74f8e4f76a9ad4dd9 /spec/models/environment_spec.rb | |
parent | 969b812433b6030b15b591ec5862daae1b707025 (diff) | |
download | gitlab-ce-a7e1205219387a6d24c8579994f73a33b3028010.tar.gz |
Use explicit instance of prometheus service and add access methods to it
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index e25d2bb6955..8c9d093fc48 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -452,8 +452,8 @@ describe Environment, models: true do end it 'returns the additional metrics from the deployment service' do - expect(project.monitoring_service).to receive(:reactive_query) - .with(Gitlab::Prometheus::Queries::AdditionalMetricsEnvironmentQuery.name, environment.id) + expect(environment.prometheus_service).to receive(:additional_environment_metrics) + .with(environment) .and_return(:fake_metrics) is_expected.to eq(:fake_metrics) @@ -470,7 +470,11 @@ describe Environment, models: true do end describe '#has_additional_metrics??' do - subject { environment.has_metrics? } + subject { environment.has_additional_metrics? } + + before do + + end context 'when the enviroment is available' do context 'with a deployment service' do |