Repository: cloudstack Updated Branches: refs/heads/4.4-forward 076bbdcfe -> 156113815
CLOUDSTACK-5887: Resolved issue in test_base_image_updation.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15611381 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15611381 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15611381 Branch: refs/heads/4.4-forward Commit: 1561138157f66485b4e3c762c4166a1c2cacd3d2 Parents: 076bbdc Author: Gaurav Aradhye <[email protected]> Authored: Mon Apr 28 02:32:31 2014 -0400 Committer: SrikanteswaraRao Talluri <[email protected]> Committed: Thu May 15 10:32:52 2014 +0530 ---------------------------------------------------------------------- .../component/test_base_image_updation.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15611381/test/integration/component/test_base_image_updation.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py index d1cc7d4..081d855 100644 --- a/test/integration/component/test_base_image_updation.py +++ b/test/integration/component/test_base_image_updation.py @@ -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 @@ -649,9 +650,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
