Fixed issues in test path files which are causing failures due to incorrect initialization of _cleanup list and returning after the skip variable is added.

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
SrikanteswaraRao Talluri 2015-04-30 06:21:08 +05:30
parent 0fa1453809
commit 6202142132
3 changed files with 14 additions and 8 deletions

View File

@ -3587,11 +3587,12 @@ class TestStorageLiveMigrationVmware(cloudstackTestCase):
cls.testdata["ostype"])
cls._cleanup = []
cls.hypervisorNotSupported = False
cls.unsupportedHypervisor = False
cls.NoResource = False
if cls.hypervisor.lower() not in [
"vmware"]:
cls.hypervisorNotSupported = True
cls.unsupportedHypervisor = True
return
# Get Hosts in the cluster and iscsi/vmfs storages for that cluster
iscsi_pools = []
try :

View File

@ -76,7 +76,7 @@ class TestUsage(cloudstackTestCase):
cls.hypervisor = testClient.getHypervisorInfo()
cls.apiclient = testClient.getApiClient()
cls.testdata = testClient.getParsedTestDataConfig()
cls._cleanup = []
# Get Zone, Domain and templates
cls.domain = get_domain(cls.apiclient)
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
@ -104,7 +104,7 @@ class TestUsage(cloudstackTestCase):
cls.apiclient,
cls.zone.id,
cls.testdata["ostype"])
cls._cleanup = []
try:
# If local storage is enabled, alter the offerings to use
@ -2959,7 +2959,7 @@ class TestUsageDirectMeteringBasicZone(cloudstackTestCase):
cls).getClsTestClient()
cls.apiclient = testClient.getApiClient()
cls.testdata = testClient.getParsedTestDataConfig()
cls._cleanup = []
# Get Zone, Domain and templates
cls.domain = get_domain(cls.apiclient)
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
@ -2970,6 +2970,7 @@ class TestUsageDirectMeteringBasicZone(cloudstackTestCase):
cls.usageJobNotRunning = False
if not isUsageJobRunning:
cls.usageJobNotRunning = True
return
if cls.testdata["configurableData"][
"setUsageConfigurationThroughTestCase"]:
@ -2984,7 +2985,7 @@ class TestUsageDirectMeteringBasicZone(cloudstackTestCase):
cls.apiclient,
cls.zone.id,
cls.testdata["ostype"])
cls._cleanup = []
try:
# If local storage is enabled, alter the offerings to use

View File

@ -127,11 +127,15 @@ class TestPathVolume(cloudstackTestCase):
cls.zone = get_zone(cls.apiclient)
cls.testdata["mode"] = cls.zone.networktype
cls.hypervisor = testClient.getHypervisorInfo()
cls._cleanup = []
cls.insuffStorage = False
cls.unsupportedHypervisor = False
#for LXC if the storage pool of type 'rbd' ex: ceph is not available, skip the test
if cls.hypervisor.lower() == 'lxc':
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
cls.insuffStorage = True
cls.insuffStorage = True
return
cls.template = get_template(
cls.apiclient,
@ -143,7 +147,7 @@ class TestPathVolume(cloudstackTestCase):
"get_template() failed to return template with description \
%s" %
cls.testdata["ostype"])
cls._cleanup = []
try:
cls.account = Account.create(cls.apiclient,
cls.testdata["account"],