[ https://issues.apache.org/jira/browse/CLOUDSTACK-7617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gaurav Aradhye reassigned CLOUDSTACK-7617: ------------------------------------------ Assignee: Gaurav Aradhye > [Automation] Fix the script "test_clustom_hostname.py" - Do not use the same > name to deploy multiple VMs. > --------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-7617 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7617 > Project: CloudStack > Issue Type: Test > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Automation, Test > Affects Versions: 4.5.0 > Reporter: Chandan Purushothama > Assignee: Gaurav Aradhye > Priority: Critical > Fix For: 4.5.0 > > > The below mentioned code is resulting in multiple test case failures in the > test suite. We should not use the same name to deploy multiple VMs in the > test suite. > {code} > def test_04_edit_display_name(self): > """ Test Edit the Display name Through the UI. > """ > # Validate the following > # 1) Set the Global Setting vm.instancename.flag to true > # 2) Create a VM give a Display name. > # 3) Once the VM is created stop the VM. > # 4) Edit the VM Display name. The Display name will be changed but > the > # internal name will not be changed. The VM functionality must not > # be effected. > self.services["virtual_machine"]["name"] = "TestVM4" > # Spawn an instance in that network > self.debug("Deploying VM in account: %s" % self.account.name) > virtual_machine = VirtualMachine.create( > self.apiclient, > self.services["virtual_machine"], > accountid=self.account.name, > domainid=self.account.domainid, > serviceofferingid=self.service_offering.id, > ) > {code} > *Error:* > {noformat} > Stacktrace > File "/usr/lib/python2.7/unittest/case.py", line 332, in run > testMethod() > File "/root/cloudstack/test/integration/component/test_custom_hostname.py", > line 540, in test_instance_name_with_hyphens > serviceofferingid=self.service_offering.id, > File "/usr/local/lib/python2.7/dist-packages/marvin/lib/base.py", line 476, > in create > virtual_machine = apiclient.deployVirtualMachine(cmd, method=method) > File > "/usr/local/lib/python2.7/dist-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", > line 706, in deployVirtualMachine > response = self.connection.marvinRequest(command, response_type=response, > method=method) > File > "/usr/local/lib/python2.7/dist-packages/marvin/cloudstackConnection.py", line > 379, in marvinRequest > raise e > 'Execute cmd: deployvirtualmachine failed, due to: errorCode: 431, > errorText:The vm with hostName TestVM4 already exists in the network domain: > cscbcloud.internal; network=Ntwk[373|Guest|8]\n > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)