Skip to content

Commit

Permalink
Fix katello-agent pre-upgrade warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik committed Apr 12, 2024
1 parent fcc7819 commit b7b3466
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/foreman/destructive/test_katello_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ def test_positive_upgrade_warning(sat_with_katello_agent):
"""
sat = sat_with_katello_agent
ver = sat.version.split('.')
target_ver = f'{ver[0]}.{int(ver[1]) + 1}'
target_ver = '6.15'
warning = (
'The katello-agent feature is enabled on this system. As of Satellite 6.15, katello-agent '
'is removed and will no longer function. Before proceeding with the upgrade, you should '
Expand All @@ -167,14 +166,11 @@ def test_positive_upgrade_warning(sat_with_katello_agent):
'which will automatically uninstall katello-agent.'
)

upstream_rpms = sat.get_repo_files_by_url(constants.FOREMAN_NIGHTLY_URL)
fm_rpm = [rpm for rpm in upstream_rpms if 'foreman_maintain' in rpm]
assert fm_rpm, 'No upstream foreman-maintain package found'

for rpm in fm_rpm:
res = sat.execute(f'yum -y install {constants.FOREMAN_NIGHTLY_URL}{rpm}')
assert res.status == 0, f'{rpm} installation failed'
settings.repos.satellite_version_undr = '6_15'
settings.repos.snap_version_undr = '6_15_0-13_0'
sat.create_custom_repos(next_maintain=settings.repos.NEW_MAINTENANCE_REPO)

sat.cli.Upgrade.list_versions() # f-m self-update
res = sat.cli.Upgrade.list_versions()
assert res.status == 0, 'Upgrade list-versions command failed'
assert target_ver in res.stdout, 'Target version or Scenario not found'
Expand Down

0 comments on commit b7b3466

Please sign in to comment.