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 6A70918AD5 for ; Wed, 24 Jun 2015 07:44:19 +0000 (UTC) Received: (qmail 6466 invoked by uid 500); 24 Jun 2015 07:44:19 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 6428 invoked by uid 500); 24 Jun 2015 07:44:19 -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 6419 invoked by uid 99); 24 Jun 2015 07:44:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jun 2015 07:44:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 14371E04EF; Wed, 24 Jun 2015 07:44:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ekho@apache.org To: commits@cloudstack.apache.org Date: Wed, 24 Jun 2015 07:44:19 -0000 Message-Id: <8b5fd1b2506e4c159733692af478a45a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: updated refs/heads/master to da72bb9 Repository: cloudstack Updated Branches: refs/heads/master 7d70e4975 -> da72bb9ae CLOUDSTACK-8574: Skip testcases for LXC if storagePool type is not RBD Signed-off-by: wilderrodrigues This closes #488 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/da72bb9a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/da72bb9a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/da72bb9a Branch: refs/heads/master Commit: da72bb9aeb5623913d4698a1b9cde2fee8962829 Parents: 6f643fc Author: pritisarap12 Authored: Tue Jun 23 11:33:21 2015 +0530 Committer: wilderrodrigues Committed: Wed Jun 24 09:43:55 2015 +0200 ---------------------------------------------------------------------- test/integration/component/test_stopped_vm.py | 46 ++++++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/da72bb9a/test/integration/component/test_stopped_vm.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py index 53a92bc..f31b803 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -19,7 +19,7 @@ """ # Import Local Modules from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase,unittest +from marvin.cloudstackTestCase import cloudstackTestCase from marvin.lib.utils import cleanup_resources from marvin.lib.base import (Account, VirtualMachine, @@ -55,11 +55,12 @@ class TestDeployVM(cloudstackTestCase): cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) cls.hypervisor = cls.testClient.getHypervisorInfo() + cls.skip = False if cls.hypervisor.lower() == 'lxc': if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): - raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") - + cls.skip = True + return cls.template = get_template( cls.api_client, @@ -92,6 +93,9 @@ class TestDeployVM(cloudstackTestCase): def setUp(self): + if self.skip: + self.skipTest("RBD storage type is required for data volumes for LXC") + self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() self.testdata["virtual_machine"]["zoneid"] = self.zone.id @@ -635,11 +639,11 @@ class TestDeployVM(cloudstackTestCase): # 4. Stop the vm # 5.list primary storages in the cluster , should be more than one # 6.Migrate voluem to another available primary storage - self.hypervisor = self.testClient.getHypervisorInfo() if self.hypervisor.lower() in ['lxc']: self.skipTest( "vm migrate is not supported in %s" % self.hypervisor) + clusters = Cluster.list( self.apiclient, zoneid=self.zone.id @@ -752,10 +756,12 @@ class TestDeployHaEnabledVM(cloudstackTestCase): cls.testdata = cls.testClient.getParsedTestDataConfig() # Get Zone, Domain and templates cls.hypervisor = cls.testClient.getHypervisorInfo() - + cls.skip = False + if cls.hypervisor.lower() == 'lxc': if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): - raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") + cls.skip = True + return cls.domain = get_domain(cls.api_client) cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) @@ -792,6 +798,9 @@ class TestDeployHaEnabledVM(cloudstackTestCase): def setUp(self): + if self.skip: + self.skipTest("RBD storage type is required for data volumes for LXC ") + self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() self.hypervisor = self.testClient.getHypervisorInfo() @@ -865,7 +874,6 @@ class TestDeployHaEnabledVM(cloudstackTestCase): # 1. deployHA enabled Vm using ISO with the startvm parameter=true # 2. listVM command should return the deployed VM. State of this VM # should be "Running". - self.hypervisor = self.testClient.getHypervisorInfo() if self.hypervisor.lower() in ['lxc']: self.skipTest( "vm deploy from ISO feature is not supported on %s" % @@ -923,10 +931,8 @@ class TestDeployHaEnabledVM(cloudstackTestCase): # 1. deployHA enabled Vm using ISO with the startvm parameter=false # 2. listVM command should return the deployed VM. State of this VM # should be "Stopped". - self.hypervisor = self.testClient.getHypervisorInfo() if self.hypervisor.lower() in ['lxc']: - self.skipTest( - "vm deploy from ISO feature is not supported on %s" % + self.skipTest("vm deploy from ISO feature is not supported on %s" % self.hypervisor.lower()) self.debug("Deploying instance in the account: %s" % @@ -961,10 +967,12 @@ class TestRouterStateAfterDeploy(cloudstackTestCase): cls.testdata = cls.testClient.getParsedTestDataConfig() # Get Zone, Domain and templates cls.hypervisor = cls.testClient.getHypervisorInfo() + cls.skip = False if cls.hypervisor.lower() == 'lxc': if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): - raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") + cls.skip = True + return cls.domain = get_domain(cls.api_client) cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) @@ -1000,6 +1008,9 @@ class TestRouterStateAfterDeploy(cloudstackTestCase): def setUp(self): + if self.skip: + self.skipTest("RBD storage type is required for data volumes for LXC") + self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() self.testdata["virtual_machine"]["zoneid"] = self.zone.id @@ -1123,10 +1134,12 @@ class TestDeployVMBasicZone(cloudstackTestCase): cls.testdata = cls.testClient.getParsedTestDataConfig() # Get Zone, Domain and templates cls.hypervisor = cls.testClient.getHypervisorInfo() + cls.skip = False if cls.hypervisor.lower() == 'lxc': if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): - raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") + cls.skip = True + return cls.domain = get_domain(cls.api_client) cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) @@ -1162,6 +1175,9 @@ class TestDeployVMBasicZone(cloudstackTestCase): def setUp(self): + if self.skip: + self.skipTest("RBD storage type is required for data volumes for LXC") + self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() self.testdata["virtual_machine"]["zoneid"] = self.zone.id @@ -1448,10 +1464,11 @@ class TestUploadAttachVolume(cloudstackTestCase): cls.testdata = cls.testClient.getParsedTestDataConfig() cls.hypervisor = cls.testClient.getHypervisorInfo() + cls.skip = False if cls.hypervisor.lower() == 'lxc': if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): - raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") + cls.skip = True # Get Zone, Domain and templates cls.domain = get_domain(cls.api_client) @@ -1491,6 +1508,9 @@ class TestUploadAttachVolume(cloudstackTestCase): return def setUp(self): + if self.skip: + self.skipTest("RBD storage type is required for data volumes for LXC") + self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() self.cleanup = []