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-05-02 19:16:59 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-05-04 21:56:26 +0300
commit63a5d98a7c921289e9b43f4b54c03614427f7eda (patch)
tree8ceed0baac1b2ede87074cf88991c201ac035102 /spec/support/prometheus_helpers.rb
parentad6ac17c5434f7eb87005dc3603b4ae9409c333f (diff)
Added specs
Diffstat (limited to 'spec/support/prometheus_helpers.rb')
-rw-r--r--spec/support/prometheus_helpers.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/prometheus_helpers.rb b/spec/support/prometheus_helpers.rb
index cc79b11616a..625a40e1154 100644
--- a/spec/support/prometheus_helpers.rb
+++ b/spec/support/prometheus_helpers.rb
@@ -33,6 +33,16 @@ module PrometheusHelpers
})
end
+ def stub_prometheus_request_with_socket_exception(url)
+ WebMock.stub_request(:get, url)
+ .to_raise(SocketError)
+ end
+
+ def stub_prometheus_request_with_ssl_exception(url)
+ WebMock.stub_request(:get, url)
+ .to_raise(OpenSSL::SSL::SSLError)
+ end
+
def stub_all_prometheus_requests(environment_slug, body: nil, status: 200)
stub_prometheus_request(
prometheus_query_url(prometheus_memory_query(environment_slug)),