Skip to content

Commit

Permalink
Let katello-agent run on a standard VM
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik committed Sep 7, 2023
1 parent af79e0c commit 3ae6c74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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

0 comments on commit 3ae6c74

Please sign in to comment.