cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [21/51] [abbrv] git commit: updated refs/heads/useraccount-refactoring to 1e25886
Date Fri, 28 Nov 2014 18:03:35 GMT
CLOUDSTACK-7949: Fixing issue in test_base_image_updation.py

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6eb4a40a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6eb4a40a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6eb4a40a

Branch: refs/heads/useraccount-refactoring
Commit: 6eb4a40afe743e4a200730073e084a4d11026219
Parents: 50ab04d
Author: Ashutosh K <ashutosh@clogeny.com>
Authored: Thu Nov 20 12:26:22 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Tue Nov 25 18:43:07 2014 +0530

----------------------------------------------------------------------
 .../component/test_base_image_updation.py            | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6eb4a40a/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 8288f2c..2f92bd2 100644
--- a/test/integration/component/test_base_image_updation.py
+++ b/test/integration/component/test_base_image_updation.py
@@ -26,7 +26,6 @@
 
 #Import Local Modules
 from marvin.codes import (PASS,
-                          FAIL,
                           RECURRING)
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import cloudstackTestCase
@@ -441,7 +440,7 @@ class TestBaseImageUpdate(cloudstackTestCase):
                                                                 template.id
                                                                 ))
                 template.download(self.apiclient)
-                self.cleanup.append(template)
+                self._cleanup.append(template)
 
                 # Wait for template status to be changed across
                 time.sleep(self.services["sleep"])
@@ -650,13 +649,13 @@ class TestBaseImageUpdate(cloudstackTestCase):
                    Here we are passing root disk id of vm before reboot which does not exist
hence\
                    listing should fail")
 
-        try:
+        with self.assertRaises(Exception):
             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")
+            self.assertEqual(
+                    validateList(listSnapshotPolicies)[0],
+                    PASS,
+                    "snapshot policies list validation failed"
+                    )
         return


Mime
View raw message