You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/09/22 19:09:12 UTC
[cloudstack] branch main updated: marvin: Fix intermittent failure
observed in test_02_list_snapshots_with_removed_data_store (#5483)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 6ba656b marvin: Fix intermittent failure observed in test_02_list_snapshots_with_removed_data_store (#5483)
6ba656b is described below
commit 6ba656b664e318122e15b2d2ed5548ba87e01fe2
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Thu Sep 23 00:37:25 2021 +0530
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
---
test/integration/smoke/test_snapshots.py | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py
index 7b67637..1da90f9 100644
--- a/test/integration/smoke/test_snapshots.py
+++ b/test/integration/smoke/test_snapshots.py
@@ -245,23 +245,30 @@ class TestSnapshotRootDisk(cloudstackTestCase):
PASS,
"Invalid response returned for list volumes")
vol_uuid = vol_res[0].id
-
- # Create new Primary Storage
clusters = list_clusters(
self.apiclient,
zoneid=self.zone.id
)
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,
self.services["nfs2"],
clusterid=clusters[0].id,
zoneid=self.zone.id,
podid=self.pod.id
)
- self.cleanup.append(self.virtual_machine_with_disk)
- self.cleanup.append(storage)
+ self.cleanup.append(storage)
self.assertEqual(
storage.state,
'Up',
@@ -296,12 +303,6 @@ class TestSnapshotRootDisk(cloudstackTestCase):
"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.apiclient,
vol