Skip to content

Commit

Permalink
Adding parametrization for broker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshdubey-star committed Oct 30, 2023
1 parent 092d048 commit 24d3caa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pytest_fixtures/component/provision_pxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ 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=2,
_count=count,
target_vlan_id=vlan_id,
target_vm_firmware=pxe_loader.vm_firmware,
target_vm_cd_iso=cd_iso,
Expand Down
4 changes: 3 additions & 1 deletion tests/foreman/api/test_discoveredhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,11 @@ def test_positive_reboot_pxe_host(
result = sat.api.DiscoveredHost(id=discovered_host.id).reboot()
assert 'Unable to perform reboot' not in result

# @pytest.mark.on_premises_provisioning
@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 @@ -413,6 +414,7 @@ def test_positive_reboot_all_pxe_hosts(
provision_multiple_hosts,
provisioning_hostgroup,
pxe_loader,
count,
):
"""Rebooting all pxe-based discovered hosts
Expand Down

0 comments on commit 24d3caa

Please sign in to comment.