Skip to content

Commit 45781b9

Browse files
nitt10prashantsanjeev
authored andcommitted
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 apache#565
1 parent 4ad178e commit 45781b9

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎test/integration/component/test_ps_limits.py‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
get_template,
3939
matchResourceCount,
4040
createSnapshotFromVirtualMachineVolume,
41-
isVmExpunged)
41+
isVmExpunged,
42+
find_storage_pool_type)
4243
from marvin.lib.utils import (cleanup_resources,
4344
validateList)
4445
from marvin.codes import (PASS,
@@ -63,6 +64,12 @@ def setUpClass(cls):
6364
cls.domain = get_domain(cls.api_client)
6465
cls.zone = get_zone(cls.api_client, cloudstackTestClient.getZoneForTests())
6566
cls.services["mode"] = cls.zone.networktype
67+
cls._cleanup = []
68+
cls.unsupportedStorageType = False
69+
if cls.hypervisor.lower() == 'lxc':
70+
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
71+
cls.unsupportedStorageType = True
72+
return
6673

6774
cls.template = get_template(
6875
cls.api_client,
@@ -73,7 +80,7 @@ def setUpClass(cls):
7380
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
7481
cls.services["virtual_machine"]["template"] = cls.template.id
7582
cls.services["volume"]["zoneid"] = cls.zone.id
76-
cls._cleanup = []
83+
7784
try:
7885
cls.service_offering = ServiceOffering.create(cls.api_client, cls.services["service_offering"])
7986
cls._cleanup.append(cls.service_offering)
@@ -92,6 +99,9 @@ def tearDownClass(cls):
9299
return
93100

94101
def setUp(self):
102+
if self.unsupportedStorageType:
103+
self.skipTest(
104+
"unsupported storage type")
95105
self.apiclient = self.testClient.getApiClient()
96106
self.dbclient = self.testClient.getDbConnection()
97107
self.cleanup = []

0 commit comments

Comments
 (0)