diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-05-02 19:16:59 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-05-04 21:56:26 +0300 |
commit | 63a5d98a7c921289e9b43f4b54c03614427f7eda (patch) | |
tree | 8ceed0baac1b2ede87074cf88991c201ac035102 /spec/support/prometheus_helpers.rb | |
parent | ad6ac17c5434f7eb87005dc3603b4ae9409c333f (diff) |
Added specs
Diffstat (limited to 'spec/support/prometheus_helpers.rb')
-rw-r--r-- | spec/support/prometheus_helpers.rb | 10 |
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)), |