Commit 470da70c authored by Guillaume Hervier's avatar Guillaume Hervier

resiliencytest.slaprunner: Add error log when contacting slaprunner.

/reviewed-on !38
parent ed7f5603
......@@ -85,6 +85,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
Connect through HTTP to the slaprunner instance.
Require self.slaprunner_backend_url to be set.
"""
try:
url = "%s/%s" % (self.slaprunner_backend_url, resource)
if data:
result = self._opener_director.open(url, data=data)
......@@ -94,6 +95,9 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
if result.getcode() is not 200:
raise NotHttpOkException(result.getcode())
return result.read()
except urllib2.HTTPError:
self.logger.error('Error when contacting slaprunner at URL: {}'.format(url))
raise
def _login(self):
self.logger.debug('Logging in...')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment