Skip to content

Commit 38c5c5c

Browse files
Add automation for BZ 2106753 (SatelliteQE#12497)
Signed-off-by: Gaurav Talreja <[email protected]>
1 parent 46677a9 commit 38c5c5c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tests/foreman/api/test_provisioningtemplate.py

+34
Original file line numberDiff line numberDiff line change
@@ -474,3 +474,37 @@ def test_positive_template_subnet_with_boot_mode(
474474
for template in pxe_templates:
475475
rendered = host.read_template(data={'template_kind': f'{template}'})['template']
476476
assert f'ks={ks_param}' in rendered
477+
478+
def test_positive_template_use_graphical_installer(
479+
self, module_target_sat, module_sca_manifest_org, module_location, default_os
480+
):
481+
"""Check whether use_graphical_installer paremeter is properly rendered
482+
in the provisioning templates
483+
484+
:id: 2decc787-59b0-41e6-96be-5dd9371c8967
485+
486+
:expectedresults: Rendered template should contain value set as per use_graphical_installer
487+
host parameter for respective rhel hosts.
488+
489+
:BZ: 2106753
490+
491+
:customerscenario: true
492+
"""
493+
host = module_target_sat.api.Host(
494+
name=gen_string('alpha'),
495+
organization=module_sca_manifest_org,
496+
location=module_location,
497+
operatingsystem=default_os,
498+
).create()
499+
# Host will default boot into text mode with kickstart's skipx command
500+
render = host.read_template(data={'template_kind': 'provision'})['template']
501+
assert 'skipx' in render
502+
assert 'text' in render
503+
# Using use_graphical_installer host param to override and use graphical mode to boot
504+
host.host_parameters_attributes = [
505+
{'name': 'use_graphical_installer', 'value': 'true', 'parameter_type': 'boolean'}
506+
]
507+
host.update(['host_parameters_attributes'])
508+
render = host.read_template(data={'template_kind': 'provision'})['template']
509+
assert 'graphical' in render
510+
assert 'skipx' not in render

0 commit comments

Comments
 (0)