CLOUDSTACK-8579: Fix cleanup operation in few test cases

Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
This closes #511
This commit is contained in:
Gaurav Aradhye 2015-06-23 17:24:05 +05:30
parent f29bf1e85c
commit c841d6850e
2 changed files with 4 additions and 1 deletions

View File

@ -743,11 +743,11 @@ class TestTemplates(cloudstackTestCase):
cls.services["ostype"]
)
cls.templateSupported = True
cls._cleanup = []
if cls.hypervisor.lower() in ['lxc']:
cls.templateSupported = False
return
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls._cleanup = []
try:
cls.account = Account.create(
cls.api_client,
@ -1024,6 +1024,7 @@ class TestDataPersistency(cloudstackTestCase):
cls.domain = get_domain(cls.api_client)
cls.services['mode'] = cls.zone.networktype
cls.templateSupported = True
cls.cleanup = []
template = get_template(
cls.api_client,
cls.zone.id,

View File

@ -512,6 +512,7 @@ class TestVolumeUsage(cloudstackTestCase):
cls.services['mode'] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.rbdStorageFound = True
cls._cleanup = []
if cls.hypervisor.lower() == 'lxc':
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
cls.rbdStorageFound = False
@ -1265,6 +1266,7 @@ class TestSnapshotUsage(cloudstackTestCase):
cls.api_client = cls.testClient.getApiClient()
cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.snapshotSupported = True
cls._cleanup = []
if cls.hypervisor.lower() in ['hyperv', 'lxc']:
cls.snapshotSupported = False
return