mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5674:Fixes for BVT and Regression test failures.
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org> Conflicts: test/integration/smoke/test_nic.py
This commit is contained in:
parent
6b0c34faee
commit
b273f66423
|
|
@ -40,20 +40,20 @@ class TestDynamicServiceOffering(cloudstackTestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
testClient = super(TestDynamicServiceOffering, cls).getClsTestClient()
|
||||
cls.apiclient = testClient.getApiClient()
|
||||
cls.api_client = cls.apiclient = testClient.getApiClient()
|
||||
cls.services = testClient.getParsedTestDataConfig()
|
||||
|
||||
# Get Zone, Domain and templates
|
||||
domain = get_domain(cls.apiclient)
|
||||
cls.domain = get_domain(cls.apiclient)
|
||||
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
|
||||
template = get_template(
|
||||
cls.template = get_template(
|
||||
cls.apiclient,
|
||||
cls.zone.id,
|
||||
cls.services["ostype"]
|
||||
)
|
||||
if template == FAILED:
|
||||
if cls.template == FAILED:
|
||||
assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]
|
||||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
|
|
@ -414,11 +414,11 @@ class TestScaleVmDynamicServiceOffering(cloudstackTestCase):
|
|||
cls.api_client = cloudstackTestClient.getApiClient()
|
||||
|
||||
# Fill services from the external config file
|
||||
cls.services = cloudstackTestClient.getConfigParser().parsedDict
|
||||
cls.services = cloudstackTestClient.getParsedTestDataConfig()
|
||||
|
||||
# Get Zone, Domain and templates
|
||||
cls.domain = get_domain(cls.api_client, cls.services)
|
||||
cls.zone = get_zone(cls.api_client, cls.services)
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(cls.api_client, cloudstackTestClient.getZoneForTests())
|
||||
cls.mode = str(cls.zone.networktype).lower()
|
||||
cls.template = get_template(
|
||||
cls.api_client,
|
||||
|
|
@ -1058,11 +1058,11 @@ class TestAccountLimits(cloudstackTestCase):
|
|||
cls.api_client = cloudstackTestClient.getApiClient()
|
||||
|
||||
# Fill services from the external config file
|
||||
cls.services = cloudstackTestClient.getConfigParser().parsedDict
|
||||
cls.services = cloudstackTestClient.getParsedTestDataConfig()
|
||||
|
||||
# Get Zone, Domain and templates
|
||||
cls.domain = get_domain(cls.api_client, cls.services)
|
||||
cls.zone = get_zone(cls.api_client, cls.services)
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(cls.api_client, cloudstackTestClient.getZoneForTests())
|
||||
cls.mode = str(cls.zone.networktype).lower()
|
||||
cls.template = get_template(
|
||||
cls.api_client,
|
||||
|
|
@ -1335,11 +1335,11 @@ class TestAffinityGroup(cloudstackTestCase):
|
|||
cls.api_client = cloudstackTestClient.getApiClient()
|
||||
|
||||
# Fill services from the external config file
|
||||
cls.services = cloudstackTestClient.getConfigParser().parsedDict
|
||||
cls.services = cloudstackTestClient.getParsedTestDataConfig()
|
||||
|
||||
# Get Zone, Domain and templates
|
||||
cls.domain = get_domain(cls.api_client, cls.services)
|
||||
cls.zone = get_zone(cls.api_client, cls.services)
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(cls.api_client, cloudstackTestClient.getZoneForTests())
|
||||
cls.mode = str(cls.zone.networktype).lower()
|
||||
cls.template = get_template(
|
||||
cls.api_client,
|
||||
|
|
|
|||
|
|
@ -105,25 +105,7 @@ class TestPrivateGwACL(cloudstackTestCase):
|
|||
self.assertIsNotNone(createNetworkResponse.id, "Network failed to create")
|
||||
self.networkId = createNetworkResponse.id
|
||||
|
||||
def deployVm(self):
|
||||
deployVirtualMachineCmd = deployVirtualMachine.deployVirtualMachineCmd()
|
||||
deployVirtualMachineCmd.networkids = self.networkId
|
||||
deployVirtualMachineCmd.serviceofferingid = self.serviceOfferingId
|
||||
deployVirtualMachineCmd.zoneid = self.zoneId
|
||||
deployVirtualMachineCmd.templateid = self.templateId
|
||||
deployVirtualMachineCmd.hypervisor = "XenServer"
|
||||
deployVMResponse = self.apiClient.deployVirtualMachine(deployVirtualMachineCmd)
|
||||
|
||||
def deployVm(self):
|
||||
deployVirtualMachineCmd = deployVirtualMachine.deployVirtualMachineCmd()
|
||||
deployVirtualMachineCmd.networkids = TestNetworkACL.networkId
|
||||
deployVirtualMachineCmd.serviceofferingid = TestNetworkACL.serviceOfferingId
|
||||
deployVirtualMachineCmd.zoneid = TestNetworkACL.zoneId
|
||||
deployVirtualMachineCmd.templateid = TestNetworkACL.templateId
|
||||
deployVirtualMachineCmd.hypervisor = "XenServer"
|
||||
deployVMResponse = self.apiClient.deployVirtualMachine(deployVirtualMachineCmd)
|
||||
TestNetworkACL.vmId = deployVMResponse.id
|
||||
self.vmId = deployVMResponse.id
|
||||
|
||||
def createPvtGw(self):
|
||||
createPrivateGatewayCmd = createPrivateGateway.createPrivateGatewayCmd()
|
||||
|
|
@ -146,7 +128,4 @@ class TestPrivateGwACL(cloudstackTestCase):
|
|||
|
||||
def tearDown(self):
|
||||
#destroy the vm
|
||||
if self.vmId is not None:
|
||||
destroyVirtualMachineCmd = destroyVirtualMachine.destroyVirtualMachineCmd()
|
||||
destroyVirtualMachineCmd.id = self.vmId
|
||||
destroyVirtualMachineResponse = self.apiClient.destroyVirtualMachine(destroyVirtualMachineCmd)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -230,6 +230,20 @@ test_data = {
|
|||
"acltype": "Domain",
|
||||
"scope": "all"
|
||||
},
|
||||
"shared_network_offering": {
|
||||
"name": "MySharedOffering-shared",
|
||||
"displaytext": "MySharedOffering",
|
||||
"guestiptype": "Shared",
|
||||
"supportedservices": "Dhcp,Dns,UserData",
|
||||
"specifyVlan": "False",
|
||||
"specifyIpRanges": "False",
|
||||
"traffictype": "GUEST",
|
||||
"serviceProviderList": {
|
||||
"Dhcp": "VirtualRouter",
|
||||
"Dns": "VirtualRouter",
|
||||
"UserData": "VirtualRouter"
|
||||
}
|
||||
},
|
||||
"shared_network_offering_sg": {
|
||||
"name": "MySharedOffering-sg",
|
||||
"displaytext": "MySharedOffering-sg",
|
||||
|
|
@ -625,5 +639,9 @@ test_data = {
|
|||
"name": "Sparse",
|
||||
"provisioningtype": "sparse",
|
||||
"disksize": 1
|
||||
}
|
||||
},
|
||||
"host_anti_affinity": {
|
||||
"name": "hostantiaffinity",
|
||||
"type": "host anti-affinity",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue