Skip to content

Commit 1a27270

Browse files
committed
restructure cleanup
1 parent 1c0d7dd commit 1a27270

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test/integration/smoke/test_vmware_vapps.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ def setUpClass(cls):
7979

8080
if cls.hypervisorNotSupported == False:
8181

82-
cls.account = Account.create(
83-
cls.apiclient,
84-
cls.services["account"],
85-
domainid=cls.domain.id
86-
)
87-
cls._cleanup.append(cls.account)
88-
8982
cls.templates = get_test_ovf_templates(
9083
cls.apiclient,
9184
cls.zone.id,
@@ -115,6 +108,13 @@ def setUpClass(cls):
115108
cls._cleanup.append(cls.l2_network_offering)
116109
cls.l2_network_offering.update(cls.apiclient, state='Enabled')
117110

111+
cls.account = Account.create(
112+
cls.apiclient,
113+
cls.services["account"],
114+
domainid=cls.domain.id
115+
)
116+
cls._cleanup.append(cls.account)
117+
118118
@classmethod
119119
def tearDownClass(cls):
120120
super(TestVAppsVM, cls).tearDownClass()
@@ -235,7 +235,6 @@ def test_01_vapps_vm_cycle(self):
235235
properties=vm_service['properties'],
236236
nicnetworklist=nicnetworklist
237237
)
238-
self.cleanup.append(vm)
239238

240239
list_vm_response = VirtualMachine.list(
241240
self.apiclient,
@@ -288,4 +287,3 @@ def test_01_vapps_vm_cycle(self):
288287
cmd = destroyVirtualMachine.destroyVirtualMachineCmd()
289288
cmd.id = vm.id
290289
self.apiclient.destroyVirtualMachine(cmd)
291-
self.cleanup.remove(vm)

0 commit comments

Comments
 (0)