From f25e59c646e2785656ce5e2124aa51c7e39ebbb5 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 9 Feb 2023 12:02:42 +0100 Subject: [PATCH 1/2] smoke test: fix test_vm_deployment_planner --- test/integration/smoke/test_vm_deployment_planner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/smoke/test_vm_deployment_planner.py b/test/integration/smoke/test_vm_deployment_planner.py index f5cb092bc155..a59b10f9caf3 100644 --- a/test/integration/smoke/test_vm_deployment_planner.py +++ b/test/integration/smoke/test_vm_deployment_planner.py @@ -56,7 +56,7 @@ def setUpClass(cls): cls.services["service_offerings"]["tiny"] ) - cls.cleanup = [ + cls._cleanup = [ cls.account, cls.service_offering ] @@ -69,7 +69,7 @@ def tearDownClass(cls): cls ).getClsTestClient().getApiClient() # Clean up, terminate the created templates - cleanup_resources(cls.apiclient, cls.cleanup) + cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) From 8f27dbfbf920cc05431e4a503760fe9e41452995 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 9 Feb 2023 12:44:23 +0100 Subject: [PATCH 2/2] Update 7183: use super.tearDownClass --- test/integration/smoke/test_vm_deployment_planner.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/integration/smoke/test_vm_deployment_planner.py b/test/integration/smoke/test_vm_deployment_planner.py index a59b10f9caf3..636eaaceb5a6 100644 --- a/test/integration/smoke/test_vm_deployment_planner.py +++ b/test/integration/smoke/test_vm_deployment_planner.py @@ -63,16 +63,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - try: - cls.apiclient = super( - TestVMDeploymentPlanner, - cls - ).getClsTestClient().getApiClient() - # Clean up, terminate the created templates - cleanup_resources(cls.apiclient, cls._cleanup) - - except Exception as e: - raise Exception("Warning: Exception during cleanup : %s" % e) + super(TestVMDeploymentPlanner, cls).tearDownClass() def deploy_vm(self, destination_id): cmd = deployVirtualMachine.deployVirtualMachineCmd()