CLOUDSTACK-7934: Fixed cleanup issues test_escalations_volumes.py

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
Ashutosh K 2014-11-18 15:06:19 +05:30 committed by SrikanteswaraRao Talluri
parent 30a2ade17a
commit 2fbef677b0

View File

@ -784,8 +784,6 @@ class TestVolumes(cloudstackTestCase):
self.assertIsNotNone(snapshot_created, "Snapshot not created") self.assertIsNotNone(snapshot_created, "Snapshot not created")
self.cleanup.append(snapshot_created)
# Creating expected and actual values dictionaries # Creating expected and actual values dictionaries
expected_dict = { expected_dict = {
"id": volume_created.id, "id": volume_created.id,
@ -1560,7 +1558,6 @@ class TestVolumes(cloudstackTestCase):
volume_created.id, volume_created.id,
) )
self.assertIsNotNone(snapshot_created, "Snapshot not created") self.assertIsNotNone(snapshot_created, "Snapshot not created")
self.cleanup.append(snapshot_created)
self.assertEquals( self.assertEquals(
volume_created.id, volume_created.id,
@ -1621,7 +1618,6 @@ class TestVolumes(cloudstackTestCase):
# Deleting a single snapshot and verifying that snapshot does not # Deleting a single snapshot and verifying that snapshot does not
# exists on page 2 # exists on page 2
Snapshot.delete(snapshot_created, self.userapiclient) Snapshot.delete(snapshot_created, self.userapiclient)
self.cleanup.remove(snapshot_created)
list_snapshot_page2 = Snapshot.list( list_snapshot_page2 = Snapshot.list(
self.userapiclient, self.userapiclient,
@ -1855,7 +1851,6 @@ class TestVolumes(cloudstackTestCase):
validateList(vol1_res)[0], validateList(vol1_res)[0],
PASS, PASS,
"Volume list returned invalid response") "Volume list returned invalid response")
self.cleanup.append(vol1)
vol1_size = vol1_res[0].size vol1_size = vol1_res[0].size
try: try:
self.virtual_machine.attach_volume(self.userapiclient, vol1) self.virtual_machine.attach_volume(self.userapiclient, vol1)
@ -1875,7 +1870,6 @@ class TestVolumes(cloudstackTestCase):
vol2, vol2,
"Failed to create custom data disk with size %s" % "Failed to create custom data disk with size %s" %
self.services["custom_volume"]["customdisksize"]) self.services["custom_volume"]["customdisksize"])
self.cleanup.append(vol2)
vol2_res = Volume.list( vol2_res = Volume.list(
self.userapiclient, self.userapiclient,
id=vol2.id id=vol2.id