Merge "Log the CA cert with the debug statement"
This commit is contained in:
commit
b9f17e3bbb
keystoneclient
@ -151,6 +151,8 @@ class Session(object):
|
||||
# so we need to actually check that this is False.
|
||||
if self.verify is False:
|
||||
string_parts.append('--insecure')
|
||||
elif isinstance(self.verify, six.string_types):
|
||||
string_parts.append('--cacert "%s"' % self.verify)
|
||||
|
||||
if method:
|
||||
string_parts.extend(['-X', method])
|
||||
|
@ -172,6 +172,16 @@ class SessionTests(utils.TestCase):
|
||||
self.assertEqual(v, resp.headers[k])
|
||||
self.assertNotIn(v, self.logger.output)
|
||||
|
||||
def test_logging_cacerts(self):
|
||||
path_to_certs = '/path/to/certs'
|
||||
session = client_session.Session(verify=path_to_certs)
|
||||
|
||||
self.stub_url('GET', text='text')
|
||||
session.get(self.TEST_URL)
|
||||
|
||||
self.assertIn('--cacert', self.logger.output)
|
||||
self.assertIn(path_to_certs, self.logger.output)
|
||||
|
||||
def test_connect_retries(self):
|
||||
|
||||
def _timeout_error(request, context):
|
||||
|
Loading…
x
Reference in New Issue
Block a user