diff --git a/pytest_fixtures/component/katello_agent.py b/pytest_fixtures/component/katello_agent.py index b25304cb8ae..690e726c0d4 100644 --- a/pytest_fixtures/component/katello_agent.py +++ b/pytest_fixtures/component/katello_agent.py @@ -48,7 +48,9 @@ def katello_agent_client(sat_with_katello_agent, rhel_contenthost): org = sat_with_katello_agent.api.Organization().create() client_repo = settings.repos['SATCLIENT_REPO'][f'RHEL{rhel_contenthost.os_version.major}'] sat_with_katello_agent.register_host_custom_repo( - org, rhel_contenthost, [client_repo, settings.repos.yum_1.url] + org, + rhel_contenthost, + [client_repo, settings.repos.yum_1.url], ) rhel_contenthost.install_katello_agent() host_info = sat_with_katello_agent.cli.Host.info({'name': rhel_contenthost.hostname}) diff --git a/robottelo/hosts.py b/robottelo/hosts.py index 930e689ff4d..ee9daca09c2 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -2003,7 +2003,7 @@ def register_host_custom_repo(self, module_org, rhel_contenthost, repo_urls): """Register content host to Satellite and sync repos :param module_org: Org where contenthost will be registered. - :param rhel_contenthost: contenthost to be register with Satellite. + :param rhel_contenthost: contenthost to be registered with Satellite. :param repo_urls: List of URLs to be synced and made available to contenthost via subscription-manager. :return: None @@ -2063,6 +2063,9 @@ def register_host_custom_repo(self, module_org, rhel_contenthost, repo_urls): # refresh repository metadata on the host rhel_contenthost.execute('subscription-manager repos --list') + # Override the repos to enabled + rhel_contenthost.execute(r'subscription-manager repos --enable \*') + def enroll_ad_and_configure_external_auth(self, ad_data): """Enroll Satellite Server to an AD Server. diff --git a/tests/foreman/destructive/test_katello_agent.py b/tests/foreman/destructive/test_katello_agent.py index f1af4dab41c..97b92c495c8 100644 --- a/tests/foreman/destructive/test_katello_agent.py +++ b/tests/foreman/destructive/test_katello_agent.py @@ -24,6 +24,7 @@ pytestmark = [ pytest.mark.run_in_one_thread, pytest.mark.destructive, + pytest.mark.no_containers, pytest.mark.tier5, pytest.mark.upgrade, ]