From 45781b95b993ad6f666e78e9871eeb4d5e8043ef Mon Sep 17 00:00:00 2001 From: nitt10prashant Date: Tue, 7 Jul 2015 17:00:19 +0530 Subject: [PATCH] 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 --- test/integration/component/test_ps_limits.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/integration/component/test_ps_limits.py b/test/integration/component/test_ps_limits.py index 1c815bf89d6..8c75cb26de1 100644 --- a/test/integration/component/test_ps_limits.py +++ b/test/integration/component/test_ps_limits.py @@ -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 = []