From b4f729f26a0edbe302bf8a708775fe7fed6ae50f Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Mon, 6 Nov 2023 02:10:28 -0500 Subject: [PATCH] [6.13.z] Fixing Discovery tests (#12926) Fixing Discovery tests (#12914) (cherry picked from commit bb8eb50bc8ed34b1933db62ea4a07f603da59788) Co-authored-by: Adarsh dubey --- tests/foreman/api/test_discoveredhost.py | 12 ++++++------ tests/foreman/cli/test_discoveredhost.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/foreman/api/test_discoveredhost.py b/tests/foreman/api/test_discoveredhost.py index 895bc252d1c..e61bf069b0a 100644 --- a/tests/foreman/api/test_discoveredhost.py +++ b/tests/foreman/api/test_discoveredhost.py @@ -172,7 +172,7 @@ class TestDiscoveredHost: @pytest.mark.on_premises_provisioning @pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True) @pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True) - @pytest.mark.rhel_ver_match('[^6]') + @pytest.mark.rhel_ver_list([8, 9]) @pytest.mark.tier3 def test_positive_provision_pxe_host( self, @@ -204,8 +204,8 @@ def test_positive_provision_pxe_host( mac = provisioning_host._broker_args['provisioning_nic_mac_addr'] wait_for( lambda: sat.api.DiscoveredHost().search(query={'mac': mac}) != [], - timeout=240, - delay=20, + timeout=600, + delay=40, ) discovered_host = sat.api.DiscoveredHost().search(query={'mac': mac})[0] discovered_host.hostgroup = provisioning_hostgroup @@ -227,7 +227,7 @@ def test_positive_provision_pxe_host( @pytest.mark.on_premises_provisioning @pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True) @pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True) - @pytest.mark.rhel_ver_match('[^6]') + @pytest.mark.rhel_ver_list([8, 9]) @pytest.mark.tier3 def test_positive_provision_pxe_less_host( self, @@ -254,8 +254,8 @@ def test_positive_provision_pxe_less_host( mac = pxeless_discovery_host._broker_args['provisioning_nic_mac_addr'] wait_for( lambda: sat.api.DiscoveredHost().search(query={'mac': mac}) != [], - timeout=240, - delay=20, + timeout=600, + delay=40, ) discovered_host = sat.api.DiscoveredHost().search(query={'mac': mac})[0] discovered_host.hostgroup = provisioning_hostgroup diff --git a/tests/foreman/cli/test_discoveredhost.py b/tests/foreman/cli/test_discoveredhost.py index 031116a2e09..4ee7015ec03 100644 --- a/tests/foreman/cli/test_discoveredhost.py +++ b/tests/foreman/cli/test_discoveredhost.py @@ -24,7 +24,7 @@ @pytest.mark.on_premises_provisioning @pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True) @pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True) -@pytest.mark.rhel_ver_match('8') +@pytest.mark.rhel_ver_match('7') def test_rhel_pxe_discovery_provisioning( module_provisioning_rhel_content, module_discovery_sat, @@ -57,8 +57,8 @@ def test_rhel_pxe_discovery_provisioning( wait_for( lambda: sat.api.DiscoveredHost().search(query={'mac': mac}) != [], - timeout=240, - delay=20, + timeout=600, + delay=40, ) discovered_host = sat.api.DiscoveredHost().search(query={'mac': mac})[0] discovered_host.hostgroup = provisioning_hostgroup @@ -95,7 +95,7 @@ def _finalize(): @pytest.mark.on_premises_provisioning @pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True) @pytest.mark.parametrize('pxe_loader', ['bios', 'uefi'], indirect=True) -@pytest.mark.rhel_ver_match('8') +@pytest.mark.rhel_ver_match('7') def test_rhel_pxeless_discovery_provisioning( module_discovery_sat, pxeless_discovery_host, @@ -120,8 +120,8 @@ def test_rhel_pxeless_discovery_provisioning( wait_for( lambda: sat.api.DiscoveredHost().search(query={'mac': mac}) != [], - timeout=240, - delay=20, + timeout=600, + delay=40, ) discovered_host = sat.api.DiscoveredHost().search(query={'mac': mac})[0] discovered_host.hostgroup = provisioning_hostgroup