This is an automated email from the ASF dual-hosted git repository. weizhou pushed a commit to branch 4.20 in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push: new 538e35f8adb test: fix test_restore_vm failure on vmware (#10885) 538e35f8adb is described below commit 538e35f8adbd0a7c4374189311e3d102d6b3414e Author: Wei Zhou <weiz...@apache.org> AuthorDate: Mon May 19 12:24:18 2025 +0200 test: fix test_restore_vm failure on vmware (#10885) * test: fix test_restore_vm failure on vmware * Fix URL for cloud-init vms on vmware/xen --- test/integration/smoke/test_restore_vm.py | 10 +++++++--- tools/marvin/marvin/config/test_data.py | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/integration/smoke/test_restore_vm.py b/test/integration/smoke/test_restore_vm.py index aac33460da1..3798bef852a 100644 --- a/test/integration/smoke/test_restore_vm.py +++ b/test/integration/smoke/test_restore_vm.py @@ -148,9 +148,13 @@ class TestRestoreVM(cloudstackTestCase): self.assertEqual(root_vol.state, 'Ready', "Volume should be in Ready state") self.assertEqual(root_vol.size, 16 * 1024 * 1024 * 1024, "Size of volume and custom disk size should match") - old_root_vol = Volume.list(self.apiclient, id=old_root_vol.id)[0] - self.assertEqual(old_root_vol.state, "Destroy", "Old volume should be in Destroy state") - Volume.delete(old_root_vol, self.apiclient) + if self.hypervisor.lower() == "vmware": + old_root_vol = Volume.list(self.apiclient, id=old_root_vol.id) + self.assertEqual(old_root_vol, None, "Old volume should be deleted") + else: + old_root_vol = Volume.list(self.apiclient, id=old_root_vol.id)[0] + self.assertEqual(old_root_vol.state, "Destroy", "Old volume should be in Destroy state") + Volume.delete(old_root_vol, self.apiclient) @attr(tags=["advanced", "basic"], required_hardware="false") def test_04_restore_vm_allocated_root(self): diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index e71c9460af0..edacf163db4 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -1080,7 +1080,7 @@ test_data = { "format": "vhd", "hypervisor": "xenserver", "ostype": "Other Linux (64-bit)", - "url": "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64-azure.vhd.tar.gz", + "url": "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64-azure.vhd.tar.gz", "requireshvm": "True", "ispublic": "True", "isextractable": "True" @@ -1091,7 +1091,7 @@ test_data = { "format": "ova", "hypervisor": "vmware", "ostype": "Other Linux (64-bit)", - "url": "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.ova", + "url": "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.ova", "requireshvm": "True", "ispublic": "True", "deployasis": "False"