mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
marvin: Fix intermittent failure observed in test_02_list_snapshots_with_removed_data_store (#5483)
* marvin: Fix intermittent failure observed in test_02_list_snapshots_with_removed_data_store * refactor test
This commit is contained in:
parent
50a0e80de6
commit
6ba656b664
@ -245,23 +245,30 @@ class TestSnapshotRootDisk(cloudstackTestCase):
|
|||||||
PASS,
|
PASS,
|
||||||
"Invalid response returned for list volumes")
|
"Invalid response returned for list volumes")
|
||||||
vol_uuid = vol_res[0].id
|
vol_uuid = vol_res[0].id
|
||||||
|
|
||||||
# Create new Primary Storage
|
|
||||||
clusters = list_clusters(
|
clusters = list_clusters(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
zoneid=self.zone.id
|
zoneid=self.zone.id
|
||||||
)
|
)
|
||||||
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
|
||||||
|
self.virtual_machine_with_disk.stop(self.apiclient)
|
||||||
|
self.virtual_machine_with_disk.attach_volume(
|
||||||
|
self.apiclient,
|
||||||
|
vol
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create new Primary Storage
|
||||||
storage = StoragePool.create(self.apiclient,
|
storage = StoragePool.create(self.apiclient,
|
||||||
self.services["nfs2"],
|
self.services["nfs2"],
|
||||||
clusterid=clusters[0].id,
|
clusterid=clusters[0].id,
|
||||||
zoneid=self.zone.id,
|
zoneid=self.zone.id,
|
||||||
podid=self.pod.id
|
podid=self.pod.id
|
||||||
)
|
)
|
||||||
self.cleanup.append(self.virtual_machine_with_disk)
|
|
||||||
self.cleanup.append(storage)
|
|
||||||
|
|
||||||
|
self.cleanup.append(storage)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
storage.state,
|
storage.state,
|
||||||
'Up',
|
'Up',
|
||||||
@ -296,12 +303,6 @@ class TestSnapshotRootDisk(cloudstackTestCase):
|
|||||||
"Check storage pool type "
|
"Check storage pool type "
|
||||||
)
|
)
|
||||||
|
|
||||||
# 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.attach_volume(
|
|
||||||
self.apiclient,
|
|
||||||
vol
|
|
||||||
)
|
|
||||||
self.virtual_machine_with_disk.detach_volume(
|
self.virtual_machine_with_disk.detach_volume(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
vol
|
vol
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user