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:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-04-28 23:20:58 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-05-04 21:56:26 +0300
commitad6ac17c5434f7eb87005dc3603b4ae9409c333f (patch)
tree9a2a976da09bece8ef6e4c418f55c4535d9334ae /spec/models/project_services
parent91e8f7702c7781ee8ccbbe9338500e616606af29 (diff)
Added rescue block for the test method for the prometheus service
Diffstat (limited to 'spec/models/project_services')
-rw-r--r--spec/models/project_services/prometheus_service_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/project_services/prometheus_service_spec.rb b/spec/models/project_services/prometheus_service_spec.rb
index d15079b686b..5ef1b53be15 100644
--- a/spec/models/project_services/prometheus_service_spec.rb
+++ b/spec/models/project_services/prometheus_service_spec.rb
@@ -93,11 +93,12 @@ describe PrometheusService, models: true, caching: true do
[404, 500].each do |status|
context "when Prometheus responds with #{status}" do
+ body_response = 'QUERY_FAILED'
before do
- stub_all_prometheus_requests(environment.slug, status: status, body: 'QUERY FAILED!')
+ stub_all_prometheus_requests(environment.slug, status: status, body: body_response)
end
- it { is_expected.to eq(success: false, result: %(#{status} - "QUERY FAILED!")) }
+ it { is_expected.to eq(success: false, result: %(#{status} - \"#{body_response}\")) }
end
end
end