CLOUDSTACK-7192: Skip tests on Hyper-V which don't apply

This commit is contained in:
John Dilley 2014-08-05 10:23:21 +00:00 committed by sanjeev
parent 37baddd721
commit d75961d973
6 changed files with 23 additions and 8 deletions

View File

@ -40,6 +40,10 @@ class TestNic(cloudstackTestCase):
# assign the signal handler immediately
signal.signal(signal.SIGINT, signal_handler)
hypervisor = self.testClient.getHypervisorInfo()
if hypervisor.lower() == "hyperv":
raise unittest.SkipTest("Not supported on Hyper-V")
try:
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()

View File

@ -56,6 +56,10 @@ class TestPrimaryStorageServices(cloudstackTestCase):
"""Test primary storage pools - XEN, KVM, VMWare
"""
if self.testClient.getHypervisorInfo().lower() == "hyperv":
raise self.skipTest("NFS primary storage not supported on Hyper-V")
# Validate the following:
# 1. List Clusters
# 2. verify that the cluster is in 'Enabled' allocation state
@ -149,6 +153,9 @@ class TestPrimaryStorageServices(cloudstackTestCase):
"""Test primary storage pools - XEN, KVM, VMWare
"""
if self.testClient.getHypervisorInfo().lower() == "hyperv":
raise self.skipTest("iSCSI primary storage Not supported on Hyper-V")
# Validate the following:
# 1. List Clusters
# 2. verify that the cluster is in 'Enabled' allocation state

View File

@ -35,8 +35,8 @@ class TestScaleVm(cloudstackTestCase):
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() == 'kvm':
raise unittest.SkipTest("ScaleVM is not supported on KVM. Hence, skipping the test")
if cls.hypervisor.lower() in ('kvm', 'hyperv'):
raise unittest.SkipTest("ScaleVM is not supported on KVM or Hyper-V. Hence, skipping the test")
# Get Zone, Domain and templates
domain = get_domain(cls.apiclient)

View File

@ -36,6 +36,10 @@ class TestSnapshotRootDisk(cloudstackTestCase):
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
cls.services['mode'] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() == 'hyperv':
raise unittest.SkipTest("Snapshots not supported on Hyper-V")
template = get_template(
cls.apiclient,
cls.zone.id,

View File

@ -38,8 +38,8 @@ class TestVmSnapshot(cloudstackTestCase):
testClient = super(TestVmSnapshot, cls).getClsTestClient()
hypervisor = testClient.getHypervisorInfo()
if hypervisor.lower() == KVM.lower():
raise unittest.SkipTest("VM snapshot feature is not supported on KVM")
if hypervisor.lower() in (KVM.lower(), "hyperv"):
raise unittest.SkipTest("VM snapshot feature is not supported on KVM or Hyper-V")
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()

View File

@ -585,8 +585,8 @@ class TestVolumes(cloudstackTestCase):
if hosts[0].hypervisor == "XenServer":
self.virtual_machine.stop(self.apiClient)
elif hosts[0].hypervisor.lower() == "vmware":
self.skipTest("Resize Volume is unsupported on VmWare")
elif hosts[0].hypervisor.lower() in ("vmware", "hyperv"):
self.skipTest("Resize Volume is unsupported on VmWare and Hyper-V")
self.apiClient.resizeVolume(cmd)
count = 0
@ -636,8 +636,8 @@ class TestVolumes(cloudstackTestCase):
if hosts[0].hypervisor == "XenServer":
self.virtual_machine.stop(self.apiClient)
elif hosts[0].hypervisor.lower() == "vmware":
self.skipTest("Resize Volume is unsupported on VmWare")
elif hosts[0].hypervisor.lower() in ("vmware", "hyperv"):
self.skipTest("Resize Volume is unsupported on VmWare and Hyper-V")
# resize the data disk
self.debug("Resize Volume ID: %s" % self.volume.id)