CLOUDSTACK-7363 test_vmware_drs.py should skip on non-VMWare hypervisors

Make the tests check if the hypervisor being used is VMWare, and skip if not

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
Alex Brett 2014-08-18 11:39:51 +01:00 committed by Santhosh Edukulla
parent 762f831c28
commit fd1a71603f

View File

@ -112,6 +112,8 @@ class TestVMPlacement(cloudstackTestCase):
def setUpClass(cls):
cls.testClient = super(TestVMPlacement, cls).getClsTestClient()
if cls.testClient.getHypervisorInfo().lower() != "vmware":
raise unittest.SkipTest("VMWare tests only valid on VMWare hypervisor")
cls.api_client = cls.testClient.getApiClient()
cls.services = Services().services
@ -272,6 +274,8 @@ class TestAntiAffinityRules(cloudstackTestCase):
def setUpClass(cls):
cls.testClient = super(TestAntiAffinityRules, cls).getClsTestClient()
if cls.testClient.getHypervisorInfo().lower() != "vmware":
raise unittest.SkipTest("VMWare tests only valid on VMWare hypervisor")
cls.api_client = cls.testClient.getApiClient()
cls.services = Services().services
@ -500,6 +504,8 @@ class TestAffinityRules(cloudstackTestCase):
def setUpClass(cls):
cls.testClient = super(TestAffinityRules, cls).getClsTestClient()
if cls.testClient.getHypervisorInfo().lower() != "vmware":
raise unittest.SkipTest("VMWare tests only valid on VMWare hypervisor")
cls.api_client = cls.testClient.getApiClient()
cls.services = Services().services