cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [18/50] [abbrv] git commit: updated refs/heads/4.4 to 2025f35
Date Mon, 28 Jul 2014 21:13:46 GMT
CLOUDSTACK-6780: Resolved cleanup issue in portable ip test cases

(cherry picked from commit 0190c936689fc252e51b7c412283c128b5386b24)


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

Branch: refs/heads/4.4
Commit: 92a9703c55b7f8718cbd9ae7403d3bed556ba0ef
Parents: ed77cf8
Author: Ashutosh K <ashutosh@clogeny.com>
Authored: Tue May 27 07:02:04 2014 -0700
Committer: Daan Hoogland <daan@onecht.net>
Committed: Mon Jul 28 23:12:46 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92a9703c/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 847bb4a..77a5ab6 100644
--- a/test/integration/component/test_portable_ip.py
+++ b/test/integration/component/test_portable_ip.py
@@ -1103,21 +1103,27 @@ class TestDisassociatePublicIp(cloudstackTestCase):
             self.fail("Failed to create portable ip: %s" % e)
 
         try:
-            self.user_account = Account.create(
+            self.otherAccount = Account.create(
                             self.apiclient,
                             self.services["account"],
                             domainid=self.domain.id
                             )
+            self.cleanup.append(self.otherAccount)
 
-            self.api_client_user = self.testClient.getUserApiClient(
-                                            UserName=self.user_account.name,
-                                            DomainName=self.user_account.domain
+            self.apiclientOtherAccount = self.testClient.getUserApiClient(
+                                            UserName=self.otherAccount.name,
+                                            DomainName=self.otherAccount.domain
                                             )
 
+            # Trying to disassociate portable ip using
+            # api client of other account than the one
+            # used to create portable ip
             with self.assertRaises(Exception):
-                portableip.delete(self.api_client_user)
-        except Exception as e:
+                portableip.delete(self.apiclientOtherAccount)
+
+            # Disassociate IP using api client of account used to create it
             portableip.delete(self.apiclient)
+        except Exception as e:
             self.fail("Exception while disassociating portable ip: %s" % e)
         return
 


Mime
View raw message