From d26d76709a2a9f4c0e1b884aeb41e740f8cf9eee Mon Sep 17 00:00:00 2001 From: David Moore Date: Tue, 26 Nov 2024 18:24:14 -0500 Subject: [PATCH] ContentViews hosts: RHEL7 > RHEL10 & 9 --- tests/foreman/cli/test_contentview.py | 18 ++++++++++-------- tests/foreman/ui/test_errata.py | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/foreman/cli/test_contentview.py b/tests/foreman/cli/test_contentview.py index 2c170fe01ae..59763b18950 100644 --- a/tests/foreman/cli/test_contentview.py +++ b/tests/foreman/cli/test_contentview.py @@ -1910,8 +1910,9 @@ def test_positive_subscribe_chost_by_id_using_ccv(self, module_org, module_targe @pytest.mark.skipif( (not settings.robottelo.REPOS_HOSTING_URL), reason='Missing repos_hosting_url' ) + @pytest.mark.rhel_ver_match('N-1') def test_positive_sub_host_with_restricted_user_perm_at_custom_loc( - self, module_org, rhel7_contenthost, target_sat + self, module_org, rhel_contenthost, target_sat ): """Attempt to subscribe a host with restricted user permissions and custom location. @@ -2064,16 +2065,17 @@ def test_positive_sub_host_with_restricted_user_perm_at_custom_loc( } ) # create a client host and register it with the created user - rhel7_contenthost.register(org, loc, ak_name, target_sat) - assert rhel7_contenthost.subscribed + rhel_contenthost.register(org, loc, ak_name, target_sat) + assert rhel_contenthost.subscribed # check that the client host exist in the system org_hosts = target_sat.cli.Host.list({'organization-id': org['id']}) assert len(org_hosts) == 1 - assert org_hosts[0]['name'] == rhel7_contenthost.hostname + assert org_hosts[0]['name'] == rhel_contenthost.hostname @pytest.mark.tier3 + @pytest.mark.rhel_ver_match('N-1') def test_positive_sub_host_with_restricted_user_perm_at_default_loc( - self, module_org, rhel7_contenthost, target_sat + self, module_org, rhel_contenthost, target_sat ): """Attempt to subscribe a host with restricted user permissions and default location. @@ -2213,12 +2215,12 @@ def test_positive_sub_host_with_restricted_user_perm_at_default_loc( assert content_view['name'] == user_content_view['name'] ak = target_sat.api.ActivationKey(content_view=user_content_view, organization=org).create() # create a client host and register it with the created user - rhel7_contenthost.register(org, loc, ak.name, target_sat) - assert rhel7_contenthost.subscribed + rhel_contenthost.register(org, loc, ak.name, target_sat) + assert rhel_contenthost.subscribed # check that the client host exist in the system org_hosts = target_sat.cli.Host.list({'organization-id': org['id']}) assert len(org_hosts) == 1 - assert org_hosts[0]['name'] == rhel7_contenthost.hostname + assert org_hosts[0]['name'] == rhel_contenthost.hostname @pytest.mark.tier1 def test_positive_clone_by_name(self, module_org, module_target_sat): diff --git a/tests/foreman/ui/test_errata.py b/tests/foreman/ui/test_errata.py index 104aa5e93ff..47cdb21d2f5 100644 --- a/tests/foreman/ui/test_errata.py +++ b/tests/foreman/ui/test_errata.py @@ -925,7 +925,7 @@ def test_positive_apply_for_all_hosts( search_rate=2, max_tries=60, ) - assert len(hosts_job) == 1 + assert len(hosts_job) >= 1 # find multiple install tasks, one for each host install_tasks = target_sat.wait_for_tasks( search_query=(