From f9003b2925fd340998fd38fd353fba187aeadc69 Mon Sep 17 00:00:00 2001 From: spisarski Date: Thu, 12 Apr 2018 10:32:44 -0600 Subject: Fixed bug when use_keystone parameter is False. When false, the self.keystone member is None and now it is being used in many more places with some of the other changes during the Fraser release JIRA: SNAPS-299 Change-Id: I752afb127287036a16f3c9b00e6feae9cab80143 Signed-off-by: spisarski --- snaps/openstack/tests/os_source_file_test.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/snaps/openstack/tests/os_source_file_test.py b/snaps/openstack/tests/os_source_file_test.py index 51b9400..c7d64d3 100644 --- a/snaps/openstack/tests/os_source_file_test.py +++ b/snaps/openstack/tests/os_source_file_test.py @@ -76,7 +76,6 @@ class OSComponentTestCase(unittest.TestCase): image_metadata, log_level)) return suite - def __clean__(self): """ Cleans up keystone session. @@ -123,7 +122,7 @@ class OSIntegrationTestCase(OSComponentTestCase): @staticmethod def parameterize(testcase_klass, os_creds, ext_net_name, - use_keystone=False, flavor_metadata=None, + use_keystone=True, flavor_metadata=None, image_metadata=None, netconf_override=None, log_level=logging.DEBUG): """ @@ -154,12 +153,10 @@ class OSIntegrationTestCase(OSComponentTestCase): self.user_creator = None self.admin_os_creds = self.os_creds self.admin_os_session = self.os_session - keystone_utils.keystone_session( - self.admin_os_creds) + self.keystone = keystone_utils.keystone_client( + self.admin_os_creds, self.admin_os_session) if self.use_keystone: - self.keystone = keystone_utils.keystone_client( - self.admin_os_creds, self.admin_os_session) guid = self.__class__.__name__ + '-' + str(uuid.uuid4())[:-19] project_name = guid + '-proj' self.project_creator = deploy_utils.create_project( @@ -203,4 +200,3 @@ class OSIntegrationTestCase(OSComponentTestCase): keystone_utils.close_session(self.admin_os_session) super(OSIntegrationTestCase, self).__clean__() - -- cgit 1.2.3-korg