This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch smoke-test-drs-xen
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 80bde68d438c9369958cf94e19678e75141c4c47
Author: Pearl Dsilva <[email protected]>
AuthorDate: Tue Apr 22 01:26:17 2025 -0400

    smoke test: Fix cluster DRS smoke test failure on XenServer / XCP-ng
---
 test/integration/smoke/test_cluster_drs.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/integration/smoke/test_cluster_drs.py 
b/test/integration/smoke/test_cluster_drs.py
index f1eb48f92f5..31ddf016d5c 100644
--- a/test/integration/smoke/test_cluster_drs.py
+++ b/test/integration/smoke/test_cluster_drs.py
@@ -23,11 +23,12 @@ import logging
 import time
 from collections.abc import Iterable
 
+from marvin.codes import FAILED
 from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.cloudstackAPI import (migrateSystemVm, listRouters, listSystemVms)
 from marvin.lib.base import (Cluster, Configurations, Host, Network, 
NetworkOffering, ServiceOffering, VirtualMachine,
                              Zone)
-from marvin.lib.common import (get_domain, get_zone, get_template)
+from marvin.lib.common import (get_domain, get_zone, get_test_template)
 from marvin.lib.utils import wait_until
 from marvin import jsonHelper
 from nose.plugins.attrib import attr
@@ -43,7 +44,15 @@ class TestClusterDRS(cloudstackTestCase):
 
         zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
         cls.zone = Zone(zone.__dict__)
-        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls.hypervisor = cls.testClient.getHypervisorInfo()
+        cls.template = cls.template = get_test_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.hypervisor
+        )
+        if cls.template == FAILED:
+            assert False, "get_test_template() failed to return template\
+                        with hypervisor %s" % cls.hypervisor
         cls._cleanup = []
 
         cls.logger = logging.getLogger("TestClusterDRS")

Reply via email to