CLOUDSTACK-8278: Usage test path - Correct code flow in case the usage job configuration is not to be set through test case

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Gaurav Aradhye 2015-02-23 02:48:16 -08:00 committed by Rohit Yadav
parent 191bcdd439
commit 54a4b2bad7
1 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,10 @@ class TestUsage(cloudstackTestCase):
"setUsageConfigurationThroughTestCase"]:
cls.setUsageConfiguration()
cls.RestartServers()
else:
currentMgtSvrTime = cls.getCurrentMgtSvrTime()
dateTimeSplit = currentMgtSvrTime.split("/")
cls.curDate = dateTimeSplit[0]
cls.hypervisor = testClient.getHypervisorInfo()
@ -2966,6 +2970,10 @@ class TestUsageDirectMeteringBasicZone(cloudstackTestCase):
"setUsageConfigurationThroughTestCase"]:
cls.setUsageConfiguration()
cls.RestartServers()
else:
currentMgtSvrTime = cls.getCurrentMgtSvrTime()
dateTimeSplit = currentMgtSvrTime.split("/")
cls.curDate = dateTimeSplit[0]
cls.template = get_template(
cls.apiclient,