marvin: Refactor - cleanup of resource after test run (#5505)

This commit is contained in:
Pearl Dsilva 2021-09-24 13:42:15 +05:30 committed by GitHub
parent 74bb80687d
commit d1f375f35a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,6 +97,7 @@ class TestSnapshotRootDisk(cloudstackTestCase):
mode=cls.services["mode"] mode=cls.services["mode"]
) )
cls._cleanup.append(cls.virtual_machine_with_disk)
cls._cleanup.append(cls.service_offering) cls._cleanup.append(cls.service_offering)
cls._cleanup.append(cls.account) cls._cleanup.append(cls.account)
cls._cleanup.append(cls.disk_offering) cls._cleanup.append(cls.disk_offering)
@ -251,8 +252,6 @@ class TestSnapshotRootDisk(cloudstackTestCase):
) )
assert isinstance(clusters,list) and len(clusters)>0 assert isinstance(clusters,list) and len(clusters)>0
self.cleanup.append(self.virtual_machine_with_disk)
# Attach created volume to vm, then detach it to be able to migrate it # Attach created volume to vm, then detach it to be able to migrate it
self.virtual_machine_with_disk.stop(self.apiclient) self.virtual_machine_with_disk.stop(self.apiclient)
self.virtual_machine_with_disk.attach_volume( self.virtual_machine_with_disk.attach_volume(