From 9245b7b71fb854b78f7690deef0a4f2fd344e148 Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Fri, 25 Jul 2014 00:31:12 -0400 Subject: [PATCH] CLOUDSTACK-7183: Fixing cleanup issue in tsest_escalations_instances.py --- test/integration/component/test_escalations_instances.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/component/test_escalations_instances.py b/test/integration/component/test_escalations_instances.py index 0cd8b683e7d..ef939f16186 100644 --- a/test/integration/component/test_escalations_instances.py +++ b/test/integration/component/test_escalations_instances.py @@ -1939,9 +1939,12 @@ class TestInstances(cloudstackTestCase): self.apiClient = self.testClient.getApiClient() self.cleanup = [] + self.cleanup_vm = [] def tearDown(self): # Clean up, terminate the created resources + for vm in self.cleanup_vm: + vm.delete(self.apiClient, expunge=True) cleanup_resources(self.apiClient, self.cleanup) return @@ -3418,7 +3421,7 @@ class TestInstances(cloudstackTestCase): vm_created, "VM creation failed" ) - self.cleanup.append(vm_created) + self.cleanup_vm.append(vm_created) # Listing all the VMs for a user again list_vms_after = VirtualMachine.list( self.userapiclient,