You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2014/10/16 13:53:23 UTC
git commit: updated refs/heads/master to 20d3cf1
Repository: cloudstack
Updated Branches:
refs/heads/master 1f8cf0bee -> 20d3cf1ac
CLOUDSTACK-7727 Skip various BVT tests on LXC
A number of BVT tests are not valid for LXC (e.g. migrating a VM), so this patch
ensures they skip if LXC is in use.
Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20d3cf1a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20d3cf1a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20d3cf1a
Branch: refs/heads/master
Commit: 20d3cf1acc535c3380e52e92a4108444a0b593e3
Parents: 1f8cf0b
Author: Alex Brett <al...@citrix.com>
Authored: Wed Oct 15 18:50:57 2014 +0100
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Thu Oct 16 17:23:04 2014 +0530
----------------------------------------------------------------------
test/integration/smoke/test_primary_storage.py | 4 ++--
test/integration/smoke/test_scale_vm.py | 4 ++--
test/integration/smoke/test_snapshots.py | 4 ++--
test/integration/smoke/test_templates.py | 6 ++++++
test/integration/smoke/test_vm_life_cycle.py | 14 +++++++++-----
test/integration/smoke/test_vm_snapshots.py | 4 ++--
6 files changed, 23 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_primary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py
index 0813d28..310afca 100644
--- a/test/integration/smoke/test_primary_storage.py
+++ b/test/integration/smoke/test_primary_storage.py
@@ -154,8 +154,8 @@ class TestPrimaryStorageServices(cloudstackTestCase):
"""Test primary storage pools - XEN. Not Supported for kvm,hyperv,vmware
"""
- if self.hypervisor.lower() in ["kvm","hyperv", "vmware"]:
- raise self.skipTest("iscsi primary storage not supported on kvm, VMWare or Hyper-V")
+ if self.hypervisor.lower() in ["kvm","hyperv", "vmware", "lxc"]:
+ raise self.skipTest("iscsi primary storage not supported on kvm, VMWare, Hyper-V, or LXC")
# Validate the following:
# 1. List Clusters
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_scale_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py
index 0b770c4..3a2983e 100644
--- a/test/integration/smoke/test_scale_vm.py
+++ b/test/integration/smoke/test_scale_vm.py
@@ -35,8 +35,8 @@ class TestScaleVm(cloudstackTestCase):
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()
cls.hypervisor = cls.testClient.getHypervisorInfo()
- if cls.hypervisor.lower() in ('kvm', 'hyperv'):
- raise unittest.SkipTest("ScaleVM is not supported on KVM or Hyper-V. Hence, skipping the test")
+ if cls.hypervisor.lower() in ('kvm', 'hyperv', 'lxc'):
+ raise unittest.SkipTest("ScaleVM is not supported on KVM, Hyper-V or LXC. Hence, skipping the test")
# Get Zone, Domain and templates
domain = get_domain(cls.apiclient)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py
index 5db3e40..2df1778 100644
--- a/test/integration/smoke/test_snapshots.py
+++ b/test/integration/smoke/test_snapshots.py
@@ -37,8 +37,8 @@ class TestSnapshotRootDisk(cloudstackTestCase):
cls.services['mode'] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
- if cls.hypervisor.lower() == 'hyperv':
- raise unittest.SkipTest("Snapshots not supported on Hyper-V")
+ if cls.hypervisor.lower() in ['hyperv', 'lxc']:
+ raise unittest.SkipTest("Snapshots not supported on Hyper-V or LXC")
template = get_template(
cls.apiclient,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py
index db938d9..4153ca3 100644
--- a/test/integration/smoke/test_templates.py
+++ b/test/integration/smoke/test_templates.py
@@ -60,6 +60,9 @@ class TestCreateTemplate(cloudstackTestCase):
testClient = super(TestCreateTemplate, cls).getClsTestClient()
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()
+ cls.hypervisor = testClient.getHypervisorInfo()
+ if cls.hypervisor.lower() in ['lxc']:
+ raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
# Get Zone, Domain and templates
cls.domain = get_domain(cls.apiclient)
@@ -208,6 +211,9 @@ class TestTemplates(cloudstackTestCase):
testClient = super(TestTemplates, cls).getClsTestClient()
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()
+ cls.hypervisor = testClient.getHypervisorInfo()
+ if cls.hypervisor.lower() in ['lxc']:
+ raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
# Get Zone, Domain and templates
cls.domain = get_domain(cls.apiclient)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 0be518d..294dc79 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -23,8 +23,7 @@ from marvin.cloudstackAPI import (recoverVirtualMachine,
attachIso,
detachIso)
from marvin.lib.utils import (cleanup_resources,
- validateList,
- get_hypervisor_type)
+ validateList)
from marvin.lib.base import (Account,
ServiceOffering,
VirtualMachine,
@@ -261,6 +260,7 @@ class TestVMLifeCycle(cloudstackTestCase):
testClient = super(TestVMLifeCycle, cls).getClsTestClient()
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()
+ cls.hypervisor = testClient.getHypervisorInfo()
# Get Zone, Domain and templates
domain = get_domain(cls.apiclient)
@@ -548,20 +548,21 @@ class TestVMLifeCycle(cloudstackTestCase):
if len(hosts) < 2:
self.skipTest("At least two hosts should be present in the zone for migration")
- hypervisor = str(get_hypervisor_type(self.apiclient)).lower()
+ if self.hypervisor.lower() in ["lxc"]:
+ self.skipTest("Migration is not supported on LXC")
# For KVM, two hosts used for migration should be present in same cluster
# For XenServer and VMware, migration is possible between hosts belonging to different clusters
# with the help of XenMotion and Vmotion respectively.
- if hypervisor.lower() in ["kvm","simulator"]:
+ if self.hypervisor.lower() in ["kvm","simulator"]:
#identify suitable host
clusters = [h.clusterid for h in hosts]
#find hosts withe same clusterid
clusters = [cluster for index, cluster in enumerate(clusters) if clusters.count(cluster) > 1]
if len(clusters) <= 1:
- self.skipTest("In " + hypervisor.lower() + " Live Migration needs two hosts within same cluster")
+ self.skipTest("In " + self.hypervisor.lower() + " Live Migration needs two hosts within same cluster")
suitable_hosts = [host for host in hosts if host.clusterid == clusters[0]]
else:
@@ -661,6 +662,9 @@ class TestVMLifeCycle(cloudstackTestCase):
# 5. Detach ISO
# 6. Check the device is properly detached by logging into VM
+ if self.hypervisor.lower() in ["lxc"]:
+ self.skipTest("ISOs are not supported on LXC")
+
iso = Iso.create(
self.apiclient,
self.services["iso1"],
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_vm_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py
index dae945c..131da99 100644
--- a/test/integration/smoke/test_vm_snapshots.py
+++ b/test/integration/smoke/test_vm_snapshots.py
@@ -38,8 +38,8 @@ class TestVmSnapshot(cloudstackTestCase):
testClient = super(TestVmSnapshot, cls).getClsTestClient()
hypervisor = testClient.getHypervisorInfo()
- if hypervisor.lower() in (KVM.lower(), "hyperv"):
- raise unittest.SkipTest("VM snapshot feature is not supported on KVM or Hyper-V")
+ if hypervisor.lower() in (KVM.lower(), "hyperv", "lxc"):
+ raise unittest.SkipTest("VM snapshot feature is not supported on KVM, Hyper-V or LXC")
cls.apiclient = testClient.getApiClient()
cls.services = testClient.getParsedTestDataConfig()