mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8615 :skip all tests in test_ps_limits.py for lxc
CLOUDSTACK-8615 :skip all tests in test_ps_limits.py for lxc This closes #565
This commit is contained in:
parent
4ad178e4b1
commit
45781b95b9
|
|
@ -38,7 +38,8 @@ from marvin.lib.common import (get_domain,
|
|||
get_template,
|
||||
matchResourceCount,
|
||||
createSnapshotFromVirtualMachineVolume,
|
||||
isVmExpunged)
|
||||
isVmExpunged,
|
||||
find_storage_pool_type)
|
||||
from marvin.lib.utils import (cleanup_resources,
|
||||
validateList)
|
||||
from marvin.codes import (PASS,
|
||||
|
|
@ -63,6 +64,12 @@ class TestVolumeLimits(cloudstackTestCase):
|
|||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(cls.api_client, cloudstackTestClient.getZoneForTests())
|
||||
cls.services["mode"] = cls.zone.networktype
|
||||
cls._cleanup = []
|
||||
cls.unsupportedStorageType = False
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
cls.unsupportedStorageType = True
|
||||
return
|
||||
|
||||
cls.template = get_template(
|
||||
cls.api_client,
|
||||
|
|
@ -73,7 +80,7 @@ class TestVolumeLimits(cloudstackTestCase):
|
|||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
cls.services["volume"]["zoneid"] = cls.zone.id
|
||||
cls._cleanup = []
|
||||
|
||||
try:
|
||||
cls.service_offering = ServiceOffering.create(cls.api_client, cls.services["service_offering"])
|
||||
cls._cleanup.append(cls.service_offering)
|
||||
|
|
@ -92,6 +99,9 @@ class TestVolumeLimits(cloudstackTestCase):
|
|||
return
|
||||
|
||||
def setUp(self):
|
||||
if self.unsupportedStorageType:
|
||||
self.skipTest(
|
||||
"unsupported storage type")
|
||||
self.apiclient = self.testClient.getApiClient()
|
||||
self.dbclient = self.testClient.getDbConnection()
|
||||
self.cleanup = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue