This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new 335e26bb1d2 test: fix failure on non-VMware env (#6969)
335e26bb1d2 is described below
commit 335e26bb1d22f3574cbef36413faa8c2d2ac32a9
Author: Abhishek Kumar <[email protected]>
AuthorDate: Mon Dec 12 10:32:29 2022 +0530
test: fix failure on non-VMware env (#6969)
PR #6964 added some changes for VM import test which are causing exceptions
on non-VMware environments. This PR fixes those error and correctly skips
unmanage and import tests for non-VMware env.
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
---
test/integration/smoke/test_vm_lifecycle_unmanage_import.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/test/integration/smoke/test_vm_lifecycle_unmanage_import.py
b/test/integration/smoke/test_vm_lifecycle_unmanage_import.py
index 26b485f751d..83879471674 100644
--- a/test/integration/smoke/test_vm_lifecycle_unmanage_import.py
+++ b/test/integration/smoke/test_vm_lifecycle_unmanage_import.py
@@ -60,6 +60,8 @@ class TestUnmanageVM(cloudstackTestCase):
assert False, "get_suitable_test_template() failed to return
template with description %s" % cls.services["ostype"]
cls.hypervisorNotSupported = cls.hypervisor.lower() != "vmware"
+ if cls.hypervisorNotSupported:
+ return
cls.services["small"]["zoneid"] = cls.zone.id
cls.services["small"]["template"] = cls.template.id
@@ -97,9 +99,14 @@ class TestUnmanageVM(cloudstackTestCase):
def setUp(self):
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
- self.services["network"]["networkoffering"] = self.network_offering.id
self.cleanup = []
self.created_networks = []
+ self.virtual_machine = None
+ self.unmanaged_instance = None
+ self.imported_vm = None
+ if self.hypervisorNotSupported:
+ return
+ self.services["network"]["networkoffering"] = self.network_offering.id
network_data = self.services["l2-network"]
self.network = Network.create(
self.apiclient,
@@ -127,8 +134,6 @@ class TestUnmanageVM(cloudstackTestCase):
)
self.cleanup.append(self.network2)
self.created_networks.append(self.network2)
- self.unmanaged_instance = None
- self.imported_vm = None
'''
Fetch vmware datacenter login details