diff options
author | helenyao <yaohelan@huawei.com> | 2017-03-10 20:23:42 +0800 |
---|---|---|
committer | helenyao <yaohelan@huawei.com> | 2017-03-13 14:31:23 +0800 |
commit | 4a989722feca53e1baa6f64985841bd6a244d627 (patch) | |
tree | cc5cef9d7cb84bbb271548cf453316f0bf5e38b9 /functest/tests/unit/utils/test_openstack_utils.py | |
parent | 68dbfb326dbfa6086ebfd36736250021b20ed5f7 (diff) |
Support running on openstack which enabled https
JIRA: FUNCTEST-757
Change-Id: Ic87bee3020b9714bcd83105127440a9c1a7ff2ad
Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/tests/unit/utils/test_openstack_utils.py')
-rw-r--r-- | functest/tests/unit/utils/test_openstack_utils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/functest/tests/unit/utils/test_openstack_utils.py b/functest/tests/unit/utils/test_openstack_utils.py index ef3764cc..f51a4991 100644 --- a/functest/tests/unit/utils/test_openstack_utils.py +++ b/functest/tests/unit/utils/test_openstack_utils.py @@ -28,7 +28,8 @@ class OSUtilsTesting(unittest.TestCase): 'OS_PROJECT_DOMAIN_NAME': os_prefix + 'project_domain_name', 'OS_PROJECT_NAME': os_prefix + 'project_name', 'OS_ENDPOINT_TYPE': os_prefix + 'endpoint_type', - 'OS_REGION_NAME': os_prefix + 'region_name'} + 'OS_REGION_NAME': os_prefix + 'region_name', + 'OS_CACERT': os_prefix + 'https_cacert'} def _get_os_env_vars(self): return {'username': 'test_username', 'password': 'test_password', @@ -37,7 +38,8 @@ class OSUtilsTesting(unittest.TestCase): 'project_domain_name': 'test_project_domain_name', 'project_name': 'test_project_name', 'endpoint_type': 'test_endpoint_type', - 'region_name': 'test_region_name'} + 'region_name': 'test_region_name', + 'https_cacert': 'test_https_cacert'} def setUp(self): self.env_vars = ['OS_AUTH_URL', 'OS_USERNAME', 'OS_PASSWORD'] @@ -299,7 +301,7 @@ class OSUtilsTesting(unittest.TestCase): 'OS_PROJECT_DOMAIN_NAME']) self.assertEqual(openstack_utils.get_rc_env_vars(), exp_resp) - @mock.patch('functest.utils.openstack_utils.get_rc_env_vars') + @mock.patch('functest.utils.openstack_utils') def test_check_credentials_missing_env(self, mock_get_rc_env): exp_resp = self.env_vars exp_resp.extend(['OS_TENANT_NAME']) |