You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ja...@apache.org on 2015/06/29 09:00:51 UTC
[30/50] [abbrv] git commit: updated refs/heads/dhcpoffload to 45721ae
CLOUDSTACK-8574: Skip testcases for LXC if storagePool type is not RBD
Signed-off-by: wilderrodrigues <wr...@schubergphilis.com>
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/dhcpoffload
Commit: da72bb9aeb5623913d4698a1b9cde2fee8962829
Parents: 6f643fc
Author: pritisarap12 <pr...@clogeny.com>
Authored: Tue Jun 23 11:33:21 2015 +0530
Committer: wilderrodrigues <wr...@schubergphilis.com>
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 = []