Add a request timeout, and pass in cacert when talking to horizon (#649)
This commit is contained in:
committed by
GitHub
parent
fd510cf4b3
commit
aa3807dfcc
@@ -66,7 +66,7 @@ def _login(dashboard_url, domain, username, password, cafile=None):
|
||||
|
||||
# start session, get csrftoken
|
||||
client = requests.session()
|
||||
client.get(auth_url, verify=cafile)
|
||||
client.get(auth_url, verify=cafile, timeout=30)
|
||||
if 'csrftoken' in client.cookies:
|
||||
csrftoken = client.cookies['csrftoken']
|
||||
else:
|
||||
@@ -501,7 +501,8 @@ class OpenStackDashboardPolicydTests(policyd.BasePolicydSpecialization,
|
||||
domain = 'admin_domain'
|
||||
username = 'admin'
|
||||
client, response = _login(
|
||||
self.get_horizon_url(), domain, username, password)
|
||||
self.get_horizon_url(), domain, username, password,
|
||||
cafile=self.cacert)
|
||||
# now attempt to get the domains page
|
||||
_url = self.url.format(unit.public_address)
|
||||
logging.info("URL is {}".format(_url))
|
||||
|
||||
Reference in New Issue
Block a user