mirror of https://github.com/apache/cloudstack.git
Fixed Few cases running on invalid zone,domain Fixed creating client on user passed port Fixed other misc issues
Signed-off-by: jayapal <jayapal@apache.org>
This commit is contained in:
parent
e18ff2821d
commit
0e975a773a
|
|
@ -169,8 +169,8 @@ class TestDeployVMVolumeCreationFailure(cloudstackTestCase):
|
|||
self.apiclient = self.testClient.getApiClient()
|
||||
|
||||
# Get Zone, Domain and Default Built-in template
|
||||
self.domain = get_domain(self.apiclient, self.testdata)
|
||||
self.zone = get_zone(self.apiclient, self.testdata)
|
||||
self.domain = get_domain(self.apiclient)
|
||||
self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
|
||||
self.testdata["mode"] = self.zone.networktype
|
||||
self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ class TestDeployVMVolumeCreationFailure(cloudstackTestCase):
|
|||
#create a service offering
|
||||
self.service_offering = ServiceOffering.create(
|
||||
self.apiclient,
|
||||
self.testdata["service_offering"]["small"]
|
||||
self.testdata["service_offerings"]["small"]
|
||||
)
|
||||
#create first VM
|
||||
self.virtual_machine = VirtualMachine.create(
|
||||
|
|
@ -280,8 +280,8 @@ class TestDeployVMStartFailure(cloudstackTestCase):
|
|||
self.apiclient = self.testClient.getApiClient()
|
||||
|
||||
# Get Zone, Domain and Default Built-in template
|
||||
self.domain = get_domain(self.apiclient, self.testdata)
|
||||
self.zone = get_zone(self.apiclient, self.testdata)
|
||||
self.domain = get_domain(self.apiclient)
|
||||
self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
|
||||
self.testdata["mode"] = self.zone.networktype
|
||||
self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ class TestDeployVMStartFailure(cloudstackTestCase):
|
|||
#create a service offering
|
||||
self.service_offering = ServiceOffering.create(
|
||||
self.apiclient,
|
||||
self.testdata["service_offering"]["small"]
|
||||
self.testdata["service_offerings"]["small"]
|
||||
)
|
||||
#create first VM
|
||||
self.virtual_machine = VirtualMachine.create(
|
||||
|
|
|
|||
|
|
@ -152,23 +152,23 @@ class CSTestClient(object):
|
|||
if api_key is None:
|
||||
ret = self.__getKeys(user_id)
|
||||
if ret != FAILED:
|
||||
self.__mgmtDetails.port = 8080
|
||||
self.__mgmtDetails.apiKey = ret[0]
|
||||
self.__mgmtDetails.securityKey = ret[1]
|
||||
mgmt_details = self.__mgmtDetails
|
||||
mgmt_details.apiKey = ret[0]
|
||||
mgmt_details.securityKey = ret[1]
|
||||
else:
|
||||
self.__logger.error("__createApiClient: API Client "
|
||||
"Creation Failed while "
|
||||
"Registering User")
|
||||
return FAILED
|
||||
else:
|
||||
self.__mgmtDetails.port = 8080
|
||||
self.__mgmtDetails.apiKey = api_key
|
||||
self.__mgmtDetails.securityKey = security_key
|
||||
mgmt_details.port = 8080
|
||||
mgmt_details.apiKey = api_key
|
||||
mgmt_details.securityKey = security_key
|
||||
'''
|
||||
Now Create the Connection objects and Api Client using
|
||||
new details
|
||||
'''
|
||||
self.__csConnection = CSConnection(self.__mgmtDetails,
|
||||
self.__csConnection = CSConnection(mgmt_details,
|
||||
self.__asyncTimeOut,
|
||||
self.__logger)
|
||||
self.__apiClient = CloudStackAPIClient(self.__csConnection)
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ class MarvinPlugin(Plugin):
|
|||
Dump Start Msg of TestCase to Log
|
||||
"""
|
||||
if self.__tcRunLogger:
|
||||
self.__tcRunLogger.debug("\n\n::::::::::::STARTED : TC: " +
|
||||
self.__tcRunLogger.debug("::::::::::::STARTED : TC: " +
|
||||
str(self.__testName) + " :::::::::::")
|
||||
self.__startTime = time.time()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue