Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 359DB10E5D for ; Fri, 2 Aug 2013 01:09:43 +0000 (UTC) Received: (qmail 56323 invoked by uid 500); 2 Aug 2013 01:09:43 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 56308 invoked by uid 500); 2 Aug 2013 01:09:43 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 56301 invoked by uid 99); 2 Aug 2013 01:09:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2013 01:09:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CE0148B6B62; Fri, 2 Aug 2013 01:09:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yasker@apache.org To: commits@cloudstack.apache.org Message-Id: <541660359e8b46649ca010cf955642c6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.2 to 83692df Date: Fri, 2 Aug 2013 01:09:42 +0000 (UTC) Updated Branches: refs/heads/4.2 a3292231d -> 83692df9b Automation: fixed cleanup issue with test_vpn_user. Reviewed-by: Sheng Yang Signed-off-by: Sheng Yang Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/83692df9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/83692df9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/83692df9 Branch: refs/heads/4.2 Commit: 83692df9b2adc4a03adf0f8db16bc038e729f251 Parents: a329223 Author: Rayees Namathponnan Authored: Thu Aug 1 17:26:27 2013 -0700 Committer: Sheng Yang Committed: Thu Aug 1 18:08:57 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/83692df9/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: