CLOUDSTACK-5377: Fixed test case dependency issue in snapshots test cases

This commit is contained in:
Gaurav Aradhye 2013-12-05 13:49:11 +05:30 committed by Girish Shilamkar
parent 50c9377774
commit 2d369dbdd8
1 changed files with 19 additions and 1 deletions

View File

@ -543,11 +543,29 @@ class TestSnapshots(cloudstackTestCase):
#3. Verify snapshot is removed by calling List Snapshots API
#4. Verify snapshot was removed from image store
self.debug("Creating volume under account: %s" % self.account.name)
volume = Volume.create(
self.apiclient,
self.services["volume"],
zoneid=self.zone.id,
account=self.account.name,
domainid=self.account.domainid,
diskofferingid=self.disk_offering.id
)
self.debug("Created volume: %s" % volume.id)
self.debug("Attaching volume to vm: %s" % self.virtual_machine.id)
self.virtual_machine.attach_volume(
self.apiclient,
volume
)
self.debug("Volume attached to vm")
volumes = list_volumes(
self.apiclient,
virtualmachineid=self.virtual_machine.id,
type='DATADISK',
listall=True
id=volume.id
)
self.assertEqual(
isinstance(volumes, list),