Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions test/integration/component/test_ps_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
get_template,
matchResourceCount,
createSnapshotFromVirtualMachineVolume,
isVmExpunged)
isVmExpunged,
find_storage_pool_type)
from marvin.lib.utils import (cleanup_resources,
validateList)
from marvin.codes import (PASS,
Expand All @@ -63,6 +64,12 @@ def setUpClass(cls):
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,
Expand All @@ -73,7 +80,7 @@ def setUpClass(cls):
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)
Expand All @@ -92,6 +99,9 @@ def tearDownClass(cls):
return

def setUp(self):
if self.unsupportedStorageType:
self.skipTest(
"unsupported storage type")
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
Expand Down