Skip to content

Commit

Permalink
Add workaround for cpu_mode for EL9 Libvirt UI tests
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Talreja <[email protected]>
  • Loading branch information
Gauravtalreja1 committed Oct 27, 2023
1 parent 2bcb943 commit 02bf020
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 @@ -21,6 +21,7 @@
from fauxfactory import gen_string
import pytest
from wait_for import wait_for
from robottelo.utils.issue_handlers import is_open

from robottelo.config import settings
from robottelo.constants import (
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 02bf020

Please sign in to comment.