mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
parent
6140db50b3
commit
8f1e0510cd
@ -742,8 +742,10 @@ class TestTemplates(cloudstackTestCase):
|
||||
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:
|
||||
@ -802,6 +804,8 @@ class TestTemplates(cloudstackTestCase):
|
||||
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):
|
||||
@ -1019,6 +1023,7 @@ class TestDataPersistency(cloudstackTestCase):
|
||||
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,
|
||||
@ -1026,7 +1031,8 @@ class TestDataPersistency(cloudstackTestCase):
|
||||
)
|
||||
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
|
||||
@ -1071,6 +1077,8 @@ class TestDataPersistency(cloudstackTestCase):
|
||||
|
||||
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):
|
||||
|
||||
@ -511,9 +511,12 @@ class TestVolumeUsage(cloudstackTestCase):
|
||||
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"]
|
||||
@ -575,6 +578,8 @@ class TestVolumeUsage(cloudstackTestCase):
|
||||
self.apiclient = self.testClient.getApiClient()
|
||||
self.dbclient = self.testClient.getDbConnection()
|
||||
self.cleanup = []
|
||||
if not self.rbdStorageFound:
|
||||
self.skipTest("")
|
||||
return
|
||||
|
||||
def tearDown(self):
|
||||
@ -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,
|
||||
@ -1324,6 +1330,8 @@ class TestSnapshotUsage(cloudstackTestCase):
|
||||
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):
|
||||
|
||||
@ -2317,6 +2317,8 @@ class TestResourceTags(cloudstackTestCase):
|
||||
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(
|
||||
|
||||
0
test/integration/smoke/test_vm_life_cycle.py
Normal file → Executable file
0
test/integration/smoke/test_vm_life_cycle.py
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user