Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions test/integration/component/test_blocker_bugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,10 @@ def setUpClass(cls):
cls.zone.id,
cls.services["ostype"]
)
cls.templateSupported = True
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
cls.templateSupported = False
return
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls._cleanup = []
try:
Expand Down Expand Up @@ -802,6 +804,8 @@ def setUp(self):
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
if not self.templateSupported:
self.skipTest("Template creation from root volume is not supported in LXC")
return

def tearDown(self):
Expand Down Expand Up @@ -1019,14 +1023,16 @@ def setUpClass(cls):
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
cls.domain = get_domain(cls.api_client)
cls.services['mode'] = cls.zone.networktype
cls.templateSupported = True
template = get_template(
cls.api_client,
cls.zone.id,
cls.services["ostype"]
)
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
cls.templateSupported = False
return
cls.services["virtual_machine"]["zoneid"] = cls.zone.id

#Create an account, network, VM and IP addresses
Expand Down Expand Up @@ -1071,6 +1077,8 @@ def tearDownClass(cls):

def setUp(self):
self.apiclient = self.testClient.getApiClient()
if not self.templateSupported:
self.skipTest("Template creation from root volume is not supported in LXC")
return

def tearDown(self):
Expand Down
18 changes: 13 additions & 5 deletions test/integration/component/test_project_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,12 @@ def setUpClass(cls):
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
cls.services['mode'] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.rbdStorageFound = True
if cls.hypervisor.lower() == 'lxc':
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
cls.rbdStorageFound = False
return
#raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
cls.disk_offering = DiskOffering.create(
cls.api_client,
cls.services["disk_offering"]
Expand Down Expand Up @@ -575,6 +578,8 @@ def setUp(self):
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
if not self.rbdStorageFound:
self.skipTest("")
return

def tearDown(self):
Expand Down Expand Up @@ -1258,16 +1263,17 @@ class TestSnapshotUsage(cloudstackTestCase):
def setUpClass(cls):
cls.testClient = super(TestSnapshotUsage, cls).getClsTestClient()
cls.api_client = cls.testClient.getApiClient()

cls.hypervisor = cls.testClient.getHypervisorInfo()
cls.snapshotSupported = True
if cls.hypervisor.lower() in ['hyperv', 'lxc']:
cls.snapshotSupported = False
return
cls.services = Services().services
# Get Zone, Domain and templates
cls.domain = get_domain(cls.api_client)
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
cls.services['mode'] = cls.zone.networktype
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower())

template = get_template(
cls.api_client,
cls.zone.id,
Expand Down Expand Up @@ -1324,6 +1330,8 @@ def setUp(self):
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
if not self.snapshotSupported:
self.skipTest("Snapshots are not supported on %s" % self.hypervisor)
return

def tearDown(self):
Expand Down
2 changes: 2 additions & 0 deletions test/integration/component/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,8 @@ def test_23_list_untagged_host_for_vm_migration(self):
4.list hosts for migration for the above deployed vm
5.All untagged hosts in the cluster must be listed as available hosts for vm migration
"""
if self.hypervisor.lower() in ['lxc']:
self.skipTest("Unsupported Hypervisor Type for User VM migration")
tag = "tag1"
clusters = list_clusters(self.apiclient, zoneid=self.zone.id)
self.assertEqual(
Expand Down
Empty file modified test/integration/smoke/test_vm_life_cycle.py
100644 → 100755
Empty file.