mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-5187: Fix test_vpc_vm_life_cycle recover tests
The vms were recovered without deleting the vms first therefore the API failed.
This commit is contained in:
parent
02c15528c8
commit
e2051de98e
@ -651,15 +651,13 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
|
|||||||
""" Test recover an instance in VPC networks
|
""" Test recover an instance in VPC networks
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Validate the following
|
self.debug("Deleted instacnes ..")
|
||||||
# 1. Recover the virtual machines.
|
try:
|
||||||
# 2. Vm should be in stopped state. State both the instances
|
self.vm_1.delete(self.apiclient)
|
||||||
# 3. Make sure that all the PF,LB and Static NAT rules on this VM
|
self.vm_2.delete(self.apiclient)
|
||||||
# works as expected.
|
except Exception as e:
|
||||||
# 3. Make sure that we are able to access google.com from this user Vm
|
self.fail("Failed to stop the virtual instances, %s" % e)
|
||||||
|
|
||||||
self.debug("Recovering the expunged virtual machines in account: %s" %
|
|
||||||
self.account.name)
|
|
||||||
try:
|
try:
|
||||||
self.vm_1.recover(self.apiclient)
|
self.vm_1.recover(self.apiclient)
|
||||||
self.vm_2.recover(self.apiclient)
|
self.vm_2.recover(self.apiclient)
|
||||||
@ -1421,15 +1419,11 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
|
|||||||
""" Test recover an instance in VPC networks
|
""" Test recover an instance in VPC networks
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Validate the following
|
try:
|
||||||
# 1. Recover the virtual machines.
|
self.vm_2.delete(self.apiclient)
|
||||||
# 2. Vm should be in stopped state. State both the instances
|
except Exception as e:
|
||||||
# 3. Make sure that all the PF,LB and Static NAT rules on this VM
|
self.fail("Failed to destroy the virtual instances, %s" % e)
|
||||||
# works as expected.
|
|
||||||
# 3. Make sure that we are able to access google.com from this user Vm
|
|
||||||
|
|
||||||
self.debug("Recovering the expunged virtual machines in account: %s" %
|
|
||||||
self.account.name)
|
|
||||||
try:
|
try:
|
||||||
self.vm_2.recover(self.apiclient)
|
self.vm_2.recover(self.apiclient)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user