Skip to content

Commit

Permalink
Tempest should ignore SSL certificate validation
Browse files Browse the repository at this point in the history
In testing and QA environments, often endpoints are set up
with self-signed or incomplete certs, and Tempest will bomb
out with complaints about being unable to validate SSL certificates.

Tempest isn't about testing SSL certificates. It's about testing
the OpenStack APIs, and if a common scenario is to test SSL and
endpoints in a testing environment, the client should disable
SSL cert checking.

Change-Id: I999cef9b5cd40a94c1b1bd63f4e19b2e58924c9a
fixes: lp bug #1089762
  • Loading branch information
jaypipes committed Dec 13, 2012
1 parent 4949439 commit e9e24dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tempest/common/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def basic_auth(self, user, password, auth_url):
params['headers'] = {'User-Agent': 'Test-Client', 'X-Auth-User': user,
'X-Auth-Key': password}

self.http_obj = httplib2.Http()
self.http_obj = httplib2.Http(disable_ssl_certificate_validation=True)
resp, body = self.http_obj.request(auth_url, 'GET', **params)
try:
return resp['x-auth-token'], resp['x-server-management-url']
Expand All @@ -125,7 +125,7 @@ def keystone_auth(self, user, password, auth_url, service, tenant_name):
}
}

self.http_obj = httplib2.Http()
self.http_obj = httplib2.Http(disable_ssl_certificate_validation=True)
headers = {'Content-Type': 'application/json'}
body = json.dumps(creds)
resp, body = self.http_obj.request(auth_url, 'POST',
Expand Down Expand Up @@ -201,7 +201,7 @@ def request(self, method, url,
if (self.token is None) or (self.base_url is None):
self._set_auth()

self.http_obj = httplib2.Http()
self.http_obj = httplib2.Http(disable_ssl_certificate_validation=True)
if headers is None:
headers = {}
headers['X-Auth-Token'] = self.token
Expand Down

0 comments on commit e9e24dd

Please sign in to comment.