@@ -56,7 +56,8 @@ def test_host_registration_end_to_end(
5656 organization = org ,
5757 activation_keys = [module_activation_key .name ],
5858 )
59- assert result .status == 0 , f'Failed to register host: { result .stderr } '
59+ if rhel_contenthost .os_version .major != 6 :
60+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
6061
6162 # Verify server.hostname and server.port from subscription-manager config
6263 assert module_target_sat .hostname == rhel_contenthost .subscription_config ['server' ]['hostname' ]
@@ -75,7 +76,8 @@ def test_host_registration_end_to_end(
7576 location = module_location ,
7677 force = True ,
7778 )
78- assert result .status == 0 , f'Failed to register host: { result .stderr } '
79+ if rhel_contenthost .os_version .major != 6 :
80+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
7981
8082 # Verify server.hostname and server.port from subscription-manager config
8183 assert (
@@ -115,7 +117,8 @@ def test_positive_allow_reregistration_when_dmi_uuid_changed(
115117 activation_keys = [module_activation_key .name ],
116118 location = module_location ,
117119 )
118- assert result .status == 0 , f'Failed to register host: { result .stderr } '
120+ if rhel_contenthost .os_version .major != 6 :
121+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
119122 target_sat .execute (f'echo \' {{"dmi.system.uuid": "{ uuid_2 } "}}\' > /etc/rhsm/facts/uuid.facts' )
120123 result = rhel_contenthost .execute ('subscription-manager unregister' )
121124 assert result .status == 0
@@ -127,10 +130,11 @@ def test_positive_allow_reregistration_when_dmi_uuid_changed(
127130 activation_keys = [module_activation_key .name ],
128131 location = module_location ,
129132 )
130- assert result .status == 0 , f'Failed to register host: { result .stderr } '
133+ if rhel_contenthost .os_version .major != 6 :
134+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
131135
132136
133- @pytest .mark .rhel_ver_match ( '8' )
137+ @pytest .mark .rhel_ver_list ([ settings . content_host . default_rhel_version ] )
134138def test_positive_update_packages_registration (
135139 module_target_sat ,
136140 module_sca_manifest_org ,
@@ -152,7 +156,8 @@ def test_positive_update_packages_registration(
152156 location = module_location ,
153157 update_packages = True ,
154158 )
155- assert result .status == 0 , f'Failed to register host: { result .stderr } '
159+ if rhel_contenthost .os_version .major != 6 :
160+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
156161
157162 package = constants .FAKE_7_CUSTOM_PACKAGE
158163 repo_url = settings .repos .yum_3 ['url' ]
@@ -161,7 +166,7 @@ def test_positive_update_packages_registration(
161166 assert result .status == 0
162167
163168
164- @pytest .mark .rhel_ver_match ( '8' )
169+ @pytest .mark .rhel_ver_list ([ settings . content_host . default_rhel_version ] )
165170@pytest .mark .no_containers
166171def test_positive_rex_interface_for_global_registration (
167172 module_target_sat ,
@@ -198,7 +203,8 @@ def test_positive_rex_interface_for_global_registration(
198203 update_packages = True ,
199204 remote_execution_interface = 'eth1' ,
200205 )
201- assert result .status == 0 , f'Failed to register host: { result .stderr } '
206+ if rhel_contenthost .os_version .major != 6 :
207+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
202208
203209 host = module_target_sat .api .Host ().search (
204210 query = {'search' : f'name={ rhel_contenthost .hostname } ' }
@@ -266,7 +272,7 @@ def test_negative_capsule_without_registration_enabled(
266272 )
267273
268274
269- @pytest .mark .rhel_ver_match ( '[^6] ' )
275+ @pytest .mark .rhel_ver_list ( r'^[\d]+$ ' )
270276def test_positive_host_registration_with_non_admin_user_with_setup_false (
271277 module_org ,
272278 module_location ,
@@ -315,7 +321,8 @@ def test_positive_host_registration_with_non_admin_user_with_setup_false(
315321 setup_remote_execution_pull = False ,
316322 update_packages = False ,
317323 )
318- assert result .status == 0 , f'Failed to register host: { result .stderr } '
324+ if rhel_contenthost .os_version .major != 6 :
325+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
319326
320327 # verify package install for insights-client didn't run when Setup Insights is false
321328 assert 'dnf -y install insights-client' not in result .stdout
@@ -327,7 +334,7 @@ def test_positive_host_registration_with_non_admin_user_with_setup_false(
327334 assert rhel_contenthost .execute ('cat ~/.ssh/authorized_keys | grep foreman-proxy' ).status == 1
328335
329336
330- @pytest .mark .rhel_ver_match ( '[^6] ' )
337+ @pytest .mark .rhel_ver_list ( r'^[\d]+$ ' )
331338def test_negative_verify_bash_exit_status_failing_host_registration (
332339 module_sca_manifest_org ,
333340 module_location ,
@@ -400,7 +407,8 @@ def test_positive_katello_ca_crt_refresh(
400407 organization = org ,
401408 activation_keys = [module_activation_key .name ],
402409 )
403- assert result .status == 0 , f'Failed to register host: { result .stderr } '
410+ if rhel_contenthost .os_version .major != 6 :
411+ assert result .status == 0 , f'Failed to register host: { result .stderr } '
404412 ca_cert_file = len (str (rhel_contenthost .execute (f'cat { katello_ca_crt_path } ' )))
405413
406414 # corrupt the certificate file
0 commit comments