cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/master to 07dcd6f
Date Fri, 02 Aug 2013 01:10:39 GMT
Updated Branches:
  refs/heads/master 600738025 -> 07dcd6ffb


Automation: fixed cleanup issue with test_vpn_user.

Reviewed-by: Sheng Yang <sheng.yang@citrix.com>
Signed-off-by: Sheng Yang <sheng.yang@citrix.com>


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

Branch: refs/heads/master
Commit: 07dcd6ffb1ccec519093911077466938d1a796fd
Parents: 6007380
Author: Rayees Namathponnan <rayees.namathponnan@citrix.com>
Authored: Thu Aug 1 17:26:27 2013 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Thu Aug 1 18:09:51 2013 -0700

----------------------------------------------------------------------
 test/integration/component/test_vpn_users.py | 53 +++++++++++++----------
 1 file changed, 29 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/07dcd6ff/test/integration/component/test_vpn_users.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpn_users.py b/test/integration/component/test_vpn_users.py
index fe020d0..e327624 100644
--- a/test/integration/component/test_vpn_users.py
+++ b/test/integration/component/test_vpn_users.py
@@ -19,6 +19,7 @@
 """
 # Import Local Modules
 from nose.plugins.attrib import attr
+from marvin.cloudstackException import cloudstackAPIException
 from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.integration.lib.base import (
                                         Account,
@@ -127,32 +128,36 @@ class TestVPNUsers(cloudstackTestCase):
         return
 
     def setUp(self):
-        self.apiclient = self.testClient.getApiClient()
-        self.dbclient = self.testClient.getDbConnection()
-        self.account = Account.create(
-                            self.apiclient,
-                            self.services["account"],
-                            domainid=self.domain.id
-                            )
-        self.virtual_machine = VirtualMachine.create(
+        try:
+            self.apiclient = self.testClient.getApiClient()
+            self.dbclient = self.testClient.getDbConnection()
+            self.account = Account.create(
                                 self.apiclient,
-                                self.services["virtual_machine"],
-                                templateid=self.template.id,
-                                accountid=self.account.name,
-                                domainid=self.account.domainid,
-                                serviceofferingid=self.service_offering.id
+                                self.services["account"],
+                                domainid=self.domain.id
                                 )
-        self.public_ip = PublicIPAddress.create(
-                                           self.apiclient,
-                                           self.virtual_machine.account,
-                                           self.virtual_machine.zoneid,
-                                           self.virtual_machine.domainid,
-                                           self.services["virtual_machine"]
-                                           )
-        self.cleanup = [
-                        self.account,
-                        ]
-        return
+            self.cleanup = [
+                            self.account,
+                            ]
+            self.virtual_machine = VirtualMachine.create(
+                                    self.apiclient,
+                                    self.services["virtual_machine"],
+                                    templateid=self.template.id,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
+                                    serviceofferingid=self.service_offering.id
+                                    )
+            self.public_ip = PublicIPAddress.create(
+                                               self.apiclient,
+                                               self.virtual_machine.account,
+                                               self.virtual_machine.zoneid,
+                                               self.virtual_machine.domainid,
+                                               self.services["virtual_machine"]
+                                               )
+            return
+        except cloudstackAPIException as e:
+                self.tearDown()
+                raise e
 
     def tearDown(self):
         try:


Mime
View raw message