From 4d38ca90d0253201da34bb28fa0720c121278f9e Mon Sep 17 00:00:00 2001 From: Gaurav Talreja Date: Fri, 27 Oct 2023 12:16:41 +0530 Subject: [PATCH] Add workaround for cpu_mode for EL9 Libvirt UI tests Signed-off-by: Gaurav Talreja --- tests/foreman/ui/test_computeresource_libvirt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/foreman/ui/test_computeresource_libvirt.py b/tests/foreman/ui/test_computeresource_libvirt.py index 1cb250d2346..2d05fa45bf3 100644 --- a/tests/foreman/ui/test_computeresource_libvirt.py +++ b/tests/foreman/ui/test_computeresource_libvirt.py @@ -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')] @@ -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 @@ -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, @@ -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',