Skip to content

Commit 69f239a

Browse files
author
Gaurav Aradhye
committed
CLOUDSTACK-8394: Skipping download ISO tests for simulator
Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com> This closes apache#207
1 parent 6dfb8ab commit 69f239a

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

test/integration/smoke/test_iso.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Import Local Modules
2020
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
2121
from marvin.cloudstackAPI import listZones, updateIso, extractIso, updateIsoPermissions, copyIso, deleteIso
22-
from marvin.lib.utils import cleanup_resources, random_gen
22+
from marvin.lib.utils import cleanup_resources, random_gen, get_hypervisor_type
2323
from marvin.lib.base import Account, Iso
2424
from marvin.lib.common import (get_domain,
2525
get_zone,
@@ -147,6 +147,12 @@ def setUpClass(cls):
147147
testClient = super(TestISO, cls).getClsTestClient()
148148
cls.apiclient = testClient.getApiClient()
149149
cls.services = testClient.getParsedTestDataConfig()
150+
cls._cleanup = []
151+
cls.unsupportedHypervisor = False
152+
cls.hypervisor = get_hypervisor_type(cls.apiclient)
153+
if cls.hypervisor == "simulator":
154+
cls.unsupportedHypervisor = True
155+
return
150156

151157
# Get Zone, Domain and templates
152158
cls.domain = get_domain(cls.apiclient)
@@ -168,6 +174,7 @@ def setUpClass(cls):
168174
cls.services["account"],
169175
domainid=cls.domain.id
170176
)
177+
cls._cleanup.append(cls.account)
171178
# Finding the OsTypeId from Ostype
172179
ostypes = list_os_types(
173180
cls.apiclient,
@@ -203,8 +210,6 @@ def setUpClass(cls):
203210
except Exception as e:
204211
raise Exception("Exception while downloading ISO %s: %s"
205212
% (cls.iso_2.id, e))
206-
207-
cls._cleanup = [cls.account]
208213
return
209214

210215
@classmethod
@@ -226,6 +231,10 @@ def setUp(self):
226231
self.dbclient = self.testClient.getDbConnection()
227232
self.cleanup = []
228233

234+
if self.unsupportedHypervisor:
235+
self.skipTest("Skipping test because unsupported hypervisor\
236+
%s" % self.hypervisor)
237+
229238
def tearDown(self):
230239
try:
231240
# Clean up, terminate the created ISOs, VMs

0 commit comments

Comments
 (0)