summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-10 13:45:08 +0000
committerGerrit Code Review <review@openstack.org>2016-02-10 13:45:08 +0000
commit1ed747c20d8e112c78c88cd342169e217b523ec5 (patch)
tree138fcd0b171a2a4043492862b045cb7d58305361
parent3da2728ce61aea60a6e8b4a50f10ba861d8e6673 (diff)
parente378d32353ab7e3a604c23ff765bc82823563301 (diff)
downloadpython-novaclient-1ed747c20d8e112c78c88cd342169e217b523ec5.tar.gz
Merge "Fix running functional tests against deployment with insecure SSL"
-rw-r--r--novaclient/tests/functional/README.rst5
-rw-r--r--novaclient/tests/functional/base.py9
2 files changed, 12 insertions, 2 deletions
diff --git a/novaclient/tests/functional/README.rst b/novaclient/tests/functional/README.rst
index 727c40ab..b343b33d 100644
--- a/novaclient/tests/functional/README.rst
+++ b/novaclient/tests/functional/README.rst
@@ -47,4 +47,9 @@ Functional Test Guidelines
OS_TENANT_NAME
OS_AUTH_URL
+* Usage of insecure SSL can be configured via the standard client environment
+ variable::
+
+ OS_INSECURE
+
* Try not to require an additional configuration file
diff --git a/novaclient/tests/functional/base.py b/novaclient/tests/functional/base.py
index 16e5f378..09e3a199 100644
--- a/novaclient/tests/functional/base.py
+++ b/novaclient/tests/functional/base.py
@@ -147,6 +147,10 @@ class ClientTestBase(testtools.TestCase):
passwd = auth_info['password']
tenant = auth_info['project_name']
auth_url = auth_info['auth_url']
+ if 'insecure' in cloud_config.config:
+ insecure = cloud_config.config['insecure']
+ else:
+ insecure = False
if self.COMPUTE_API_VERSION == "2.latest":
version = novaclient.API_MAX_VERSION.get_string()
@@ -154,7 +158,7 @@ class ClientTestBase(testtools.TestCase):
version = self.COMPUTE_API_VERSION or "2"
self.client = novaclient.client.Client(
version, user, passwd, tenant,
- auth_url=auth_url)
+ auth_url=auth_url, insecure=insecure)
# pick some reasonable flavor / image combo
self.flavor = pick_flavor(self.client.flavors.list())
@@ -174,7 +178,8 @@ class ClientTestBase(testtools.TestCase):
password=passwd,
tenant_name=tenant,
uri=auth_url,
- cli_dir=cli_dir)
+ cli_dir=cli_dir,
+ insecure=insecure)
def nova(self, action, flags='', params='', fail_ok=False,
endpoint_type='publicURL', merge_stderr=False):