Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/deployment_metrics_spec.rb')
-rw-r--r--spec/models/deployment_metrics_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/deployment_metrics_spec.rb b/spec/models/deployment_metrics_spec.rb
index fadfc1b63ac..c804e20d66d 100644
--- a/spec/models/deployment_metrics_spec.rb
+++ b/spec/models/deployment_metrics_spec.rb
@@ -15,35 +15,35 @@ RSpec.describe DeploymentMetrics do
context 'when deployment is success' do
let(:deployment) { create(:deployment, :success) }
- context 'without a monitoring service' do
+ context 'without a monitoring integration' do
it { is_expected.to be_falsy }
end
- context 'with a Prometheus Service' do
- let(:prometheus_service) { instance_double(PrometheusService, can_query?: true, configured?: true) }
+ context 'with a Prometheus integration' do
+ let(:prometheus_integration) { instance_double(::Integrations::Prometheus, can_query?: true, configured?: true) }
before do
- allow(deployment.project).to receive(:find_or_initialize_service).with('prometheus').and_return prometheus_service
+ allow(deployment.project).to receive(:find_or_initialize_integration).with('prometheus').and_return prometheus_integration
end
it { is_expected.to be_truthy }
end
- context 'with a Prometheus Service that cannot query' do
- let(:prometheus_service) { instance_double(PrometheusService, configured?: true, can_query?: false) }
+ context 'with a Prometheus integration that cannot query' do
+ let(:prometheus_integration) { instance_double(::Integrations::Prometheus, configured?: true, can_query?: false) }
before do
- allow(deployment.project).to receive(:find_or_initialize_service).with('prometheus').and_return prometheus_service
+ allow(deployment.project).to receive(:find_or_initialize_integration).with('prometheus').and_return prometheus_integration
end
it { is_expected.to be_falsy }
end
- context 'with a Prometheus Service that is not configured' do
- let(:prometheus_service) { instance_double(PrometheusService, configured?: false, can_query?: false) }
+ context 'with a Prometheus integration that is not configured' do
+ let(:prometheus_integration) { instance_double(::Integrations::Prometheus, configured?: false, can_query?: false) }
before do
- allow(deployment.project).to receive(:find_or_initialize_service).with('prometheus').and_return prometheus_service
+ allow(deployment.project).to receive(:find_or_initialize_integration).with('prometheus').and_return prometheus_integration
end
it { is_expected.to be_falsy }
@@ -64,7 +64,7 @@ RSpec.describe DeploymentMetrics do
describe '#metrics' do
let(:deployment) { create(:deployment, :success) }
- let(:prometheus_adapter) { instance_double(PrometheusService, can_query?: true, configured?: true) }
+ let(:prometheus_adapter) { instance_double(::Integrations::Prometheus, can_query?: true, configured?: true) }
let(:deployment_metrics) { described_class.new(deployment.project, deployment) }
subject { deployment_metrics.metrics }