Skip to content

Commit

Permalink
Add workaround for cpu_mode for EL9 Libvirt UI tests (#12996)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 4c43843)
  • Loading branch information
Gauravtalreja1 authored and web-flow committed Oct 27, 2023
1 parent 148e827 commit e5dc00b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/foreman/ui/test_computeresource_libvirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
FOREMAN_PROVIDERS,
LIBVIRT_RESOURCE_URL,
)
from robottelo.utils.issue_handlers import is_open

pytestmark = [pytest.mark.skip_if_not_set('libvirt')]

Expand Down Expand Up @@ -135,6 +136,7 @@ def test_positive_provision_end_to_end(
module_location,
provisioning_hostgroup,
module_libvirt_provisioning_sat,
module_provisioning_rhel_content,
):
"""Provision Host on libvirt compute resource, and delete it afterwards
Expand All @@ -146,12 +148,14 @@ def test_positive_provision_end_to_end(
:customerscenario: true
:BZ: 1243223
:BZ: 1243223, 2236693
:parametrized: yes
"""
sat = module_libvirt_provisioning_sat.sat
hostname = gen_string('alpha').lower()
os_major_ver = module_provisioning_rhel_content.os.major
cpu_mode = 'host-passthrough' if is_open('BZ:2236693') and os_major_ver == '9' else 'default'
cr = sat.api.LibvirtComputeResource(
provider=FOREMAN_PROVIDERS['libvirt'],
url=LIBVIRT_URL,
Expand All @@ -169,6 +173,7 @@ def test_positive_provision_end_to_end(
'host.inherit_deploy_option': False,
'host.deploy': f'{cr.name} (Libvirt)',
'provider_content.virtual_machine.memory': '6144',
'provider_content.virtual_machine.cpu_mode': cpu_mode,
'interfaces.interface.network_type': 'Physical (Bridge)',
'interfaces.interface.network': f'br-{settings.provisioning.vlan_id}',
'additional_information.comment': 'Libvirt provision using valid data',
Expand Down

0 comments on commit e5dc00b

Please sign in to comment.