Skip to content

Commit 80bde68

Browse files
committed
smoke test: Fix cluster DRS smoke test failure on XenServer / XCP-ng
1 parent 0af887b commit 80bde68

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/integration/smoke/test_cluster_drs.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
import time
2424
from collections.abc import Iterable
2525

26+
from marvin.codes import FAILED
2627
from marvin.cloudstackTestCase import cloudstackTestCase
2728
from marvin.cloudstackAPI import (migrateSystemVm, listRouters, listSystemVms)
2829
from marvin.lib.base import (Cluster, Configurations, Host, Network, NetworkOffering, ServiceOffering, VirtualMachine,
2930
Zone)
30-
from marvin.lib.common import (get_domain, get_zone, get_template)
31+
from marvin.lib.common import (get_domain, get_zone, get_test_template)
3132
from marvin.lib.utils import wait_until
3233
from marvin import jsonHelper
3334
from nose.plugins.attrib import attr
@@ -43,7 +44,15 @@ def setUpClass(cls):
4344

4445
zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
4546
cls.zone = Zone(zone.__dict__)
46-
cls.template = get_template(cls.apiclient, cls.zone.id)
47+
cls.hypervisor = cls.testClient.getHypervisorInfo()
48+
cls.template = cls.template = get_test_template(
49+
cls.apiclient,
50+
cls.zone.id,
51+
cls.hypervisor
52+
)
53+
if cls.template == FAILED:
54+
assert False, "get_test_template() failed to return template\
55+
with hypervisor %s" % cls.hypervisor
4756
cls._cleanup = []
4857

4958
cls.logger = logging.getLogger("TestClusterDRS")

0 commit comments

Comments
 (0)