CLOUDSTACK-5887: Resolved issue in test_base_image_updation.py

(cherry picked from commit 1561138157)
This commit is contained in:
Gaurav Aradhye 2014-04-28 02:32:31 -04:00 committed by Daan Hoogland
parent cc597d07fd
commit 8dd32992ee
1 changed files with 10 additions and 5 deletions

View File

@ -26,6 +26,7 @@
#Import Local Modules
from marvin.codes import (PASS,
FAIL,
RECURRING)
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
@ -647,9 +648,13 @@ class TestBaseImageUpdate(cloudstackTestCase):
Here we are passing root disk id of vm before reboot which does not exist hence\
listing should fail")
with self.assertRaises(Exception):
list_snapshots_policy = SnapshotPolicy.list(
self.apiclient,
volumeid=vm_with_reset_root_disk_id
)
try:
listSnapshotPolicies = SnapshotPolicy.list(
self.apiclient,
volumeid=vm_with_reset_root_disk_id)
except Exception as e:
self.fail("Failed to list snapshot policies: %s" % e)
self.assertEqual(validateList(listSnapshotPolicies)[0], FAIL,\
"Snapshot policies list should be empty")
return