Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6eb9e981
Commit
6eb9e981
authored
May 04, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved changelog entry, also changed error message for HTTParty error
parent
64e81195
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
changelogs/unreleased/prometheus-integration-test-setting-fix.yml
...gs/unreleased/prometheus-integration-test-setting-fix.yml
+1
-1
lib/gitlab/prometheus.rb
lib/gitlab/prometheus.rb
+1
-1
spec/lib/gitlab/prometheus_spec.rb
spec/lib/gitlab/prometheus_spec.rb
+1
-1
No files found.
changelogs/unreleased/prometheus-integration-test-setting-fix.yml
View file @
6eb9e981
---
title
:
Added rescue block for the test method
title
:
Prevent 500 errors caused by testing the Prometheus service
merge_request
:
10994
author
:
lib/gitlab/prometheus.rb
View file @
6eb9e981
...
...
@@ -55,7 +55,7 @@ module Gitlab
rescue
OpenSSL
::
SSL
::
SSLError
raise
PrometheusError
,
"
#{
url
}
contains invalid SSL data"
rescue
HTTParty
::
Error
raise
PrometheusError
,
"
An error has ocurred
"
raise
PrometheusError
,
"
Network connection error
"
end
def
handle_response
(
response
)
...
...
spec/lib/gitlab/prometheus_spec.rb
View file @
6eb9e981
...
...
@@ -73,7 +73,7 @@ describe Gitlab::Prometheus, lib: true do
req_stub
=
stub_prometheus_request_with_exception
(
prometheus_url
,
HTTParty
::
Error
)
expect
{
subject
.
send
(
:get
,
prometheus_url
)
}
.
to
raise_error
(
Gitlab
::
PrometheusError
,
"
An error has ocurred
"
)
.
to
raise_error
(
Gitlab
::
PrometheusError
,
"
Network connection error
"
)
expect
(
req_stub
).
to
have_been_requested
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment