From 69f239afffdb8e9cd6e8d698d65cecbb609d7021 Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Wed, 29 Apr 2015 11:28:18 +0530 Subject: [PATCH] CLOUDSTACK-8394: Skipping download ISO tests for simulator Signed-off-by: Gaurav Aradhye This closes #207 --- test/integration/smoke/test_iso.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index c5e5f314b68..88416992a08 100644 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -19,7 +19,7 @@ # Import Local Modules from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.cloudstackAPI import listZones, updateIso, extractIso, updateIsoPermissions, copyIso, deleteIso -from marvin.lib.utils import cleanup_resources, random_gen +from marvin.lib.utils import cleanup_resources, random_gen, get_hypervisor_type from marvin.lib.base import Account, Iso from marvin.lib.common import (get_domain, get_zone, @@ -147,6 +147,12 @@ class TestISO(cloudstackTestCase): testClient = super(TestISO, cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() + cls._cleanup = [] + cls.unsupportedHypervisor = False + cls.hypervisor = get_hypervisor_type(cls.apiclient) + if cls.hypervisor == "simulator": + cls.unsupportedHypervisor = True + return # Get Zone, Domain and templates cls.domain = get_domain(cls.apiclient) @@ -168,6 +174,7 @@ class TestISO(cloudstackTestCase): cls.services["account"], domainid=cls.domain.id ) + cls._cleanup.append(cls.account) # Finding the OsTypeId from Ostype ostypes = list_os_types( cls.apiclient, @@ -203,8 +210,6 @@ class TestISO(cloudstackTestCase): except Exception as e: raise Exception("Exception while downloading ISO %s: %s" % (cls.iso_2.id, e)) - - cls._cleanup = [cls.account] return @classmethod @@ -226,6 +231,10 @@ class TestISO(cloudstackTestCase): self.dbclient = self.testClient.getDbConnection() self.cleanup = [] + if self.unsupportedHypervisor: + self.skipTest("Skipping test because unsupported hypervisor\ + %s" % self.hypervisor) + def tearDown(self): try: # Clean up, terminate the created ISOs, VMs