Skip snapshot tests since it is not supported on LXC

This closes #314
This commit is contained in:
sanjeev 2015-05-27 12:39:40 +05:30
parent 39e2590a7b
commit dce34ad747
1 changed files with 6 additions and 2 deletions

View File

@ -40,9 +40,11 @@ class TestSnapshots(cloudstackTestCase):
cls.testClient = super(TestSnapshots, cls).getClsTestClient()
cls.api_client = cls.testClient.getApiClient()
cls.services = cls.testClient.getParsedTestDataConfig()
cls.unsupportedHypervisor = False
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() == 'lxc':
raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower())
if cls.hypervisor.lower() in ("lxc"):
cls.unsupportedHypervisor = True
return
# Get Domain, Zone, Template
cls.domain = get_domain(cls.api_client)
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
@ -102,6 +104,8 @@ class TestSnapshots(cloudstackTestCase):
self.apiClient = self.testClient.getApiClient()
self.cleanup = []
if self.unsupportedHypervisor:
self.skipTest("Snapshots are not supported on %s" %self.hypervisor)
def tearDown(self):
# Clean up, terminate the created resources