Skip to content

Commit 996c2f6

Browse files
committed
Merge pull request #900 from sanju1010/scale_vm
CLOUDSTACK-8924: Removed duplicate test from test_scale_vm.pyPlease go through CS-8924 for more details. * pr/900: CLOUDSTACK-8924: Removed duplicate test from test_scale_vm.py Signed-off-by: Remi Bergsma <github@remi.nl>
2 parents 3ded3e9 + 33bdfc7 commit 996c2f6

1 file changed

Lines changed: 2 additions & 74 deletions

File tree

test/integration/smoke/test_scale_vm.py

Lines changed: 2 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def tearDown(self):
118118
return
119119

120120
@attr(hypervisor="xenserver")
121-
@attr(tags=["advanced", "basic"], required_hardware="true")
121+
@attr(tags=["advanced", "basic"], required_hardware="false")
122122
def test_01_scale_vm(self):
123123
"""Test scale virtual machine
124124
"""
@@ -202,76 +202,4 @@ def test_01_scale_vm(self):
202202
'Running',
203203
"Check the state of VM"
204204
)
205-
return
206-
207-
@attr(tags=["advanced", "basic"], required_hardware="false")
208-
def test_02_scale_vm_without_hypervisor_specifics(self):
209-
# Validate the following
210-
# Scale up the vm and see if it scales to the new svc offering and is
211-
# finally in running state
212-
213-
# VirtualMachine should be updated to tell cloudstack
214-
# it has PV tools
215-
# available and successfully scaled. We will only mock
216-
# that behaviour
217-
# here but it is not expected in production since the VM
218-
# scaling is not
219-
# guaranteed until tools are installed, vm rebooted
220-
221-
self.virtual_machine.update(
222-
self.apiclient,
223-
isdynamicallyscalable='true')
224-
225-
self.debug("Scaling VM-ID: %s to service offering: %s and state %s" % (
226-
self.virtual_machine.id,
227-
self.big_offering.id,
228-
self.virtual_machine.state
229-
))
230-
231-
cmd = scaleVirtualMachine.scaleVirtualMachineCmd()
232-
cmd.serviceofferingid = self.big_offering.id
233-
cmd.id = self.virtual_machine.id
234-
self.apiclient.scaleVirtualMachine(cmd)
235-
236-
list_vm_response = VirtualMachine.list(
237-
self.apiclient,
238-
id=self.virtual_machine.id
239-
)
240-
self.assertEqual(
241-
isinstance(list_vm_response, list),
242-
True,
243-
"Check list response returns a valid list"
244-
)
245-
246-
self.assertNotEqual(
247-
list_vm_response,
248-
None,
249-
"Check virtual machine is in listVirtualMachines"
250-
)
251-
252-
vm_response = list_vm_response[0]
253-
self.assertEqual(
254-
vm_response.id,
255-
self.virtual_machine.id,
256-
"Check virtual machine ID of scaled VM"
257-
)
258-
259-
self.debug(
260-
"Scaling VM-ID: %s from service offering: %s to new service\
261-
offering %s and the response says %s" %
262-
(self.virtual_machine.id,
263-
self.virtual_machine.serviceofferingid,
264-
self.big_offering.id,
265-
vm_response.serviceofferingid))
266-
self.assertEqual(
267-
vm_response.serviceofferingid,
268-
self.big_offering.id,
269-
"Check service offering of the VM"
270-
)
271-
272-
self.assertEqual(
273-
vm_response.state,
274-
'Running',
275-
"Check the state of VM"
276-
)
277-
return
205+
return

0 commit comments

Comments
 (0)