cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From santhosheduku...@apache.org
Subject git commit: updated refs/heads/master to d3f7561
Date Tue, 12 Aug 2014 12:21:42 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master d75961d97 -> d3f75618e


CLOUDSTACK-7304: Fixed Exception not raised issue in portable IP test cases

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>


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

Branch: refs/heads/master
Commit: d3f75618e7aeca5586d494c217ad5b6d3dcfd3c2
Parents: d75961d
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Mon Aug 11 04:10:14 2014 -0700
Committer: Santhosh Edukulla <santhosh.edukulla@gmail.com>
Committed: Tue Aug 12 17:51:23 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_portable_ip.py | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d3f75618/test/integration/component/test_portable_ip.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py
index b9c9059..73aa7c0 100644
--- a/test/integration/component/test_portable_ip.py
+++ b/test/integration/component/test_portable_ip.py
@@ -1218,8 +1218,7 @@ class TestDeleteAccount(cloudstackTestCase):
         # 2. Delete account
         # 3. Account should get deleted successfully
 
-        try:
-            portableip = PublicIPAddress.create(
+        portableip = PublicIPAddress.create(
                                     self.apiclient,
                                     accountid=self.account.name,
                                     zoneid=self.zone.id,
@@ -1227,12 +1226,10 @@ class TestDeleteAccount(cloudstackTestCase):
                                     networkid=self.network.id,
                                     isportable=True
                                     )
-            self.account.delete(self.apiclient)
-            with self.assertRaises(Exception):
-                PublicIPAddress.list(self.apiclient,
-                                 id=portableip.ipaddress.id)
-        except Exception as e:
-            self.fail(e)
+        self.account.delete(self.apiclient)
+        list_publicips = PublicIPAddress.list(self.apiclient,
+                                       id=portableip.ipaddress.id)
+        self.assertEqual(list_publicips, None, "List of ip addresses should be empty")
         return
 
     @attr(tags=["advanced", "selfservice"])
@@ -1313,10 +1310,9 @@ class TestDeleteAccount(cloudstackTestCase):
         self.debug("Trying to list the ip address associated with deleted account, \
                 should throw exception")
 
-        with self.assertRaises(Exception):
-            PublicIPAddress.list(self.apiclient,
-                                 id=portableip.ipaddress.id)
-
+        list_publicips = PublicIPAddress.list(self.apiclient,
+                                              id=portableip.ipaddress.id)
+        self.assertEqual(list_publicips, None, "List of ip addresses should be empty")
         return
 
 class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):


Mime
View raw message