Skip to content

Commit eb90db1

Browse files
committed
fix non-strict affinity group tests on Xenserver due to missing PV drivers on template used for VM
1 parent 4841969 commit eb90db1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/integration/smoke/test_nonstrict_affinity_group.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737

3838
from marvin.lib.common import (get_domain,
3939
get_zone,
40-
get_template)
40+
get_template,
41+
get_test_template)
4142

4243

4344
class TestNonStrictAffinityGroups(cloudstackTestCase):
@@ -54,7 +55,11 @@ def setUpClass(cls):
5455

5556
zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
5657
cls.zone = Zone(zone.__dict__)
57-
cls.template = get_template(cls.apiclient, cls.zone.id)
58+
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)
5863
cls._cleanup = []
5964

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

0 commit comments

Comments
 (0)