From 65ba35308a5ef55e7cd1c6f1a71df94e3afe9dde Mon Sep 17 00:00:00 2001 From: Adarsh dubey Date: Wed, 18 Oct 2023 00:37:36 +0530 Subject: [PATCH] Fixing Discovery tests (#12914) (cherry picked from commit bb8eb50bc8ed34b1933db62ea4a07f603da59788) --- 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 773175812cf..0db7c486bcf 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