cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject git commit: updated refs/heads/master to dd26d4d
Date Wed, 11 Jun 2014 05:59:50 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 23280a47b -> dd26d4db6


CLOUDSTACK-6780: Resolved cleanup issue in portable ip test cases


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

Branch: refs/heads/master
Commit: dd26d4db63aa42da9da7bea0a31c541760c74125
Parents: 23280a4
Author: Ashutosh K <ashutosh@clogeny.com>
Authored: Tue May 27 07:02:04 2014 -0700
Committer: Girish Shilamkar <girish@clogeny.com>
Committed: Wed Jun 11 11:29:17 2014 +0530

----------------------------------------------------------------------
 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/dd26d4db/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