Skip to content

Commit

Permalink
[6.15.z] Fix parametrization in test_positive_reboot_all_pxe_hosts (#…
Browse files Browse the repository at this point in the history
…14083)

Fix parametrization in test_positive_reboot_all_pxe_hosts (#13949)

Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)

Co-authored-by: Gaurav Talreja <[email protected]>
  • Loading branch information
Satellite-QE and Gauravtalreja1 authored Feb 15, 2024
1 parent 2e5c953 commit c3d14e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 1 addition & 4 deletions pytest_fixtures/component/provision_pxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,10 @@ def provision_multiple_hosts(module_ssh_key_file, pxe_loader, request):
cd_iso = (
"" # TODO: Make this an optional fixture parameter (update vm_firmware when adding this)
)
# Keeping the default value to 2
count = request.param if request.param is not None else 2

with Broker(
workflow="deploy-configure-pxe-provisioning-host-rhv",
host_class=ContentHost,
_count=count,
_count=getattr(request, 'param', 2),
target_vlan_id=vlan_id,
target_vm_firmware=pxe_loader.vm_firmware,
target_vm_cd_iso=cd_iso,
Expand Down
9 changes: 5 additions & 4 deletions tests/foreman/api/test_discoveredhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ def test_positive_reboot_pxe_host(

@pytest.mark.on_premises_provisioning
@pytest.mark.parametrize('module_provisioning_sat', ['discovery'], indirect=True)
@pytest.mark.parametrize('pxe_loader', ['bios'], indirect=True)
@pytest.mark.rhel_ver_match('9')
@pytest.mark.parametrize('provision_multiple_hosts', [2])
@pytest.mark.tier3
def test_positive_reboot_all_pxe_hosts(
self,
Expand All @@ -415,13 +413,15 @@ def test_positive_reboot_all_pxe_hosts(
:parametrized: yes
:Setup: Provisioning should be configured and hosts should be discovered via PXE boot.
:setup: Provisioning should be configured and hosts should be discovered via PXE boot.
:steps: PUT /api/v2/discovered_hosts/reboot_all
:expectedresults: All discovered hosst should be rebooted successfully
:CaseImportance: Medium
:BZ: 2264195
"""
sat = module_discovery_sat.sat
for host in provision_multiple_hosts:
Expand All @@ -437,8 +437,9 @@ def test_positive_reboot_all_pxe_hosts(
discovered_host.location = provisioning_hostgroup.location[0]
discovered_host.organization = provisioning_hostgroup.organization[0]
discovered_host.build = True
# Until BZ 2264195 is resolved, reboot_all is expected to fail
result = sat.api.DiscoveredHost().reboot_all()
assert 'Discovered hosts are rebooting now' in result['message']
assert 'Discovered hosts are rebooting now' in result['success_msg']


class TestFakeDiscoveryTests:
Expand Down

0 comments on commit c3d14e4

Please sign in to comment.