From e572055192d85954efa81dfa4b3ca5ad80db9434 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Tue, 11 Jul 2017 10:16:59 +0000 Subject: 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 --- snaps/openstack/utils/tests/keystone_utils_tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'snaps/openstack/utils/tests/keystone_utils_tests.py') 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): """ -- cgit 1.2.3-korg