Skip to content

Commit

Permalink
[6.13.z] Add closed loop BZ#2149030 for Provisioning Templates (#11177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Apr 6, 2023
1 parent f9d2b7b commit 6b987ca
Showing 1 changed file with 48 additions and 2 deletions.
50 changes: 48 additions & 2 deletions tests/foreman/api/test_provisioningtemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@ def test_positive_provision_template_check_net_interface(
:expectedresults: The rendered provision template has correct network interface.
:CaseImportance: High
:BZ: 2148433
:customerscenario: true
Expand All @@ -310,3 +308,51 @@ def test_positive_provision_template_check_net_interface(
).create()
provision_template = host.read_template(data={'template_kind': 'provision'})
assert 'ifcfg-$sanitized_real' in str(provision_template)

@pytest.mark.parametrize('module_sync_kickstart_content', [7, 8, 9], indirect=True)
def test_positive_template_check_ipxe(
self,
module_sync_kickstart_content,
module_target_sat,
module_sca_manifest_org,
module_location,
module_default_org_view,
module_lce_library,
default_architecture,
default_partitiontable,
):
"""Read the iPXE template and verify 'ks=' parameter is rendered as
expected for different rhel hosts.
:id: 065ef48f-bec5-4535-8be7-d8527fa21563
:expectedresults: The rendered iPXE template contains the "ks=" parameter
expected for respective rhel hosts.
:BZ: 2149030
:customerscenario: true
"""
macaddress = gen_mac(multicast=False)
capsule = module_target_sat.nailgun_smart_proxy
host = module_target_sat.api.Host(
organization=module_sca_manifest_org,
location=module_location,
name=gen_string('alpha').lower(),
mac=macaddress,
operatingsystem=module_sync_kickstart_content.os,
architecture=default_architecture,
domain=module_sync_kickstart_content.domain,
root_pass=settings.provisioning.host_root_password,
ptable=default_partitiontable,
content_facet_attributes={
'content_source_id': capsule.id,
'content_view_id': module_default_org_view.id,
'lifecycle_environment_id': module_lce_library.id,
},
).create()
ipxe_template = host.read_template(data={'template_kind': 'iPXE'})
if module_sync_kickstart_content.rhel_ver <= 8:
assert str(ipxe_template).count('ks=') == 1
else:
assert str(ipxe_template).count('inst.ks=') == 1

0 comments on commit 6b987ca

Please sign in to comment.