Skip to content

Commit

Permalink
Update occurences of repo option in register to use repo_data (#16215)
Browse files Browse the repository at this point in the history
(cherry picked from commit 622f090)
  • Loading branch information
shweta83 authored and web-flow committed Sep 4, 2024
1 parent 3f2557c commit 3b4c1b3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pytest_fixtures/core/contenthosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def registered_hosts(request, target_sat, module_org, module_ak_with_cv):
with Broker(**host_conf(request), host_class=ContentHost, _count=2) as hosts:
for vm in hosts:
repo = settings.repos['SATCLIENT_REPO'][f'RHEL{vm.os_version.major}']
vm.register(module_org, None, module_ak_with_cv.name, target_sat, repo=repo)
vm.register(
module_org, None, module_ak_with_cv.name, target_sat, repo_data=f'repo={repo}'
)
yield hosts


Expand All @@ -146,7 +148,7 @@ def katello_host_tools_host(target_sat, module_org, rhel_contenthost):
auto_attach=True,
).create()

rhel_contenthost.register(module_org, None, ak.name, target_sat, repo=repo)
rhel_contenthost.register(module_org, None, ak.name, target_sat, repo_data=f'repo={repo}')
rhel_contenthost.install_katello_host_tools()
return rhel_contenthost

Expand All @@ -171,7 +173,9 @@ def rex_contenthost(request, module_org, target_sat, module_ak_with_cv):
request.param['no_containers'] = True
with Broker(**host_conf(request), host_class=ContentHost) as host:
repo = settings.repos['SATCLIENT_REPO'][f'RHEL{host.os_version.major}']
host.register(module_org, None, module_ak_with_cv.name, target_sat, repo=repo)
host.register(
module_org, None, module_ak_with_cv.name, target_sat, repo_data=f'repo={repo}'
)
yield host


Expand All @@ -181,7 +185,9 @@ def rex_contenthosts(request, module_org, target_sat, module_ak_with_cv):
with Broker(**host_conf(request), host_class=ContentHost, _count=2) as hosts:
for host in hosts:
repo = settings.repos['SATCLIENT_REPO'][f'RHEL{host.os_version.major}']
host.register(module_org, None, module_ak_with_cv.name, target_sat, repo=repo)
host.register(
module_org, None, module_ak_with_cv.name, target_sat, repo_data=f'repo={repo}'
)
yield hosts


Expand Down

0 comments on commit 3b4c1b3

Please sign in to comment.