diff options
author | 2017-07-11 10:16:59 +0000 | |
---|---|---|
committer | 2017-07-12 14:57:12 +0000 | |
commit | e572055192d85954efa81dfa4b3ca5ad80db9434 (patch) | |
tree | fa18748c04c83db236eb24111d15abe4f5ec73b2 | |
parent | 2a6d3a0f73eb58762bdbe10567cfbb6edec54abb (diff) |
Fix the unittest of get_endpoint
The endpoints according to interface may be same or different
on different deployment, which depends on the configuration
during the deployment.
Change-Id: Id2127a3c3fe0eca4b10a98c548d10391912f9610
Signed-off-by: Linda Wang <wangwulin@huawei.com>
-rw-r--r-- | snaps/openstack/utils/tests/keystone_utils_tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/snaps/openstack/utils/tests/keystone_utils_tests.py b/snaps/openstack/utils/tests/keystone_utils_tests.py index 89b2b2c..336b9ea 100644 --- a/snaps/openstack/utils/tests/keystone_utils_tests.py +++ b/snaps/openstack/utils/tests/keystone_utils_tests.py @@ -138,9 +138,9 @@ class KeystoneUtilsTests(OSComponentTestCase): project_name='project'), service_type='image') - def test_get_endpoint_with_different_interface(self): + def test_get_endpoint_with_each_interface(self): """ - Tests to ensure that different endpoint urls are obtained with + Tests to ensure that endpoint urls are obtained with 'public', 'internal' and 'admin' interface """ endpoint_public = keystone_utils.get_endpoint(self.os_creds, @@ -152,9 +152,9 @@ class KeystoneUtilsTests(OSComponentTestCase): endpoint_admin = keystone_utils.get_endpoint(self.os_creds, service_type='image', interface='admin') - self.assertNotEqual(endpoint_public, endpoint_internal) - self.assertNotEqual(endpoint_public, endpoint_admin) - self.assertEqual(endpoint_admin, endpoint_internal) + self.assertIsNotNone(endpoint_public) + self.assertIsNotNone(endpoint_internal) + self.assertIsNotNone(endpoint_admin) def test_grant_user_role_to_project(self): """ |