File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,7 @@ def register(
634634 hostgroup = None ,
635635 auth_username = None ,
636636 auth_password = None ,
637+ download_utility = None ,
637638 ):
638639 """Registers content host to the Satellite or Capsule server
639640 using a global registration template.
@@ -704,6 +705,8 @@ def register(
704705 options ['ignore-subman-errors' ] = str (ignore_subman_errors ).lower ()
705706 if force :
706707 options ['force' ] = str (force ).lower ()
708+ if download_utility is not None :
709+ options ['download-utility' ] = download_utility
707710
708711 self ._satellite = target .satellite
709712 if auth_username and auth_password :
Original file line number Diff line number Diff line change @@ -339,6 +339,39 @@ def test_positive_global_registration_with_gpg_repo(
339339 assert rhel_contenthost .execute ('dnf install -y bear' ).status == 0
340340
341341
342+ @pytest .mark .upgrade
343+ @pytest .mark .no_containers
344+ @pytest .mark .rhel_ver_list ([settings .content_host .default_rhel_version ])
345+ @pytest .mark .parametrize ('download_utility' , ['wget' , 'curl' ])
346+ def test_positive_register_download_utility (
347+ module_sca_manifest_org ,
348+ module_location ,
349+ module_activation_key ,
350+ module_target_sat ,
351+ rhel_contenthost ,
352+ download_utility ,
353+ ):
354+ """Verify host registration command gets generated and host is registered successfully with all supported download utilities.
355+
356+ :id: 80c3204a-7923-4c70-b7c1-7b368c61d4b8
357+
358+ :steps:
359+ 1. Register host with global registration template using different download utilities.
360+
361+ :expectedresults: Host is successfully registered.
362+ """
363+ org = module_sca_manifest_org
364+ result = rhel_contenthost .register (
365+ org ,
366+ module_location ,
367+ module_activation_key .name ,
368+ module_target_sat ,
369+ download_utility = download_utility ,
370+ )
371+ assert result .status == 0
372+ assert rhel_contenthost .subscribed
373+
374+
342375@pytest .mark .parametrize ('setting_update' , ['default_location_subscribed_hosts' ], indirect = True )
343376@pytest .mark .rhel_ver_list ([settings .content_host .default_rhel_version ])
344377def test_positive_verify_default_location_for_registered_host (
You can’t perform that action at this time.
0 commit comments