Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix katello-agent #12395

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pytest_fixtures/component/katello_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
5 changes: 4 additions & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions tests/foreman/destructive/test_katello_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
pytestmark = [
pytest.mark.run_in_one_thread,
pytest.mark.destructive,
pytest.mark.no_containers,
pytest.mark.tier5,
pytest.mark.upgrade,
]
Expand Down