Skip to content

Commit 39d6d88

Browse files
committed
address comment
1 parent eb90db1 commit 39d6d88

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/integration/smoke/test_nonstrict_affinity_group.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import logging
2323

24+
from marvin.codes import FAILED
2425
from nose.plugins.attrib import attr
2526
from marvin.cloudstackTestCase import cloudstackTestCase
2627
from marvin.cloudstackAPI import startVirtualMachine, stopVirtualMachine, destroyVirtualMachine
@@ -56,10 +57,10 @@ def setUpClass(cls):
5657
zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
5758
cls.zone = Zone(zone.__dict__)
5859
cls.hypervisor = cls.testClient.getHypervisorInfo()
59-
if cls.hypervisor.lower() not in ["xenserver"]:
60-
cls.template = get_template(cls.apiclient, cls.zone.id)
61-
else:
62-
cls.template = get_test_template(cls.apiclient, cls.zone.id, cls.hypervisor)
60+
cls.template = get_test_template(cls.apiclient, cls.zone.id, cls.hypervisor)
61+
if cls.template == FAILED:
62+
assert False, "get_test_template() failed to return template\
63+
with hypervisor %s" % cls.hypervisor
6364
cls._cleanup = []
6465

6566
cls.logger = logging.getLogger("TestNonStrictAffinityGroups")

0 commit comments

Comments
 (0)