File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2121
2222import logging
2323
24+ from marvin .codes import FAILED
2425from nose .plugins .attrib import attr
2526from marvin .cloudstackTestCase import cloudstackTestCase
2627from 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" )
You can’t perform that action at this time.
0 commit comments