CLOUDSTACK-5674: getZoneForTests should return None if zone is "NA" in test_data.py

This commit is contained in:
Santhosh Edukulla 2014-02-14 10:45:14 +05:30 committed by Girish Shilamkar
parent f3364ca6a4
commit c0d8b9e334
3 changed files with 11 additions and 5 deletions

View File

@ -96,8 +96,10 @@ class CSTestClient(object):
@Output : Returns the Zone Name
'''
if self.__zone is None:
if self.__parsedTestDataConfig is not None:
self.__zone = self.__parsedTestDataConfig.get("zone")
if self.__parsedTestDataConfig:
ret = self.__parsedTestDataConfig.get("zone")
if ret != "NA":
self.__zone = ret
return self.__zone
def __setHypervisorToClient(self):

View File

@ -5,7 +5,6 @@ test_data = {
"regionendpoint": "http://region2:8080/client"
},
"zone": "NA",
"domain": { "name": "domain" },
"project": {

View File

@ -227,6 +227,8 @@ class MarvinPlugin(Plugin):
def __runSuites(self, suites):
for suite in suites:
if os.path.isdir(suite):
return self.__runSuites(suite)
self.__runSuite(suite)
def startMarvin(self):
@ -240,14 +242,17 @@ class MarvinPlugin(Plugin):
'''
try:
if self.__deployDcFlag:
print "\nStep1 :Deploy Flag is Enabled, will deployDC"
print "\n***Step1 :Deploy Flag is Enabled, will deployDC****"
obj_marvininit = MarvinInit(self.__configFile,
self.__deployDcFlag,
"DeployDc",
self.__zoneForTests)
if not obj_marvininit or obj_marvininit.init() != SUCCESS:
return FAILED
print "\nStep2: Now Start Running Test Suites"
print "\n*******Now Start Running Test Suites***"
if len(self.conf.testNames) == 0:
print "\n*** No Test Suites are provided, please check**"
return FAILED
for suites in self.conf.testNames:
if os.path.isdir(suites):
self.__runSuites(suites)