Skip to content

Commit

Permalink
Update test_negative_pre_upgrade_tuning_profile_check for RHEL9
Browse files Browse the repository at this point in the history
  • Loading branch information
jameerpathan111 committed Apr 17, 2024
1 parent 4b9be13 commit b8ae86b
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tests/foreman/maintain/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,16 @@ def test_negative_pre_upgrade_tuning_profile_check(request, custom_host):
last_y_stream = last_y_stream_version(
SATELLITE_VERSION if sat_version == 'stream' else sat_version
)
custom_host.download_repofile(product='satellite', release=last_y_stream)
custom_host.execute(
f'dnf -y module enable satellite:el{rhel_major} && dnf -y install satellite'
# Updated test to do a z-stream upgrade, as Satellite on RHEL9 is supported from 6.16 onwards.
# Remove this condition once 6.16 is GA
target_version = (
'6.16.z' if (SATELLITE_VERSION == '6.16' and rhel_major == 9) else SATELLITE_VERSION
)
if target_version == '6.16.z':
custom_host.download_repofile(product='satellite', release=sat_version)
else:
custom_host.download_repofile(product='satellite', release=last_y_stream)
custom_host.install_satellite_or_capsule_package()
# Install with development tuning profile to get around installer checks
custom_host.execute(
'satellite-installer --scenario satellite --tuning development',
Expand All @@ -155,10 +161,10 @@ def test_negative_pre_upgrade_tuning_profile_check(request, custom_host):
custom_host.execute('satellite-maintain upgrade list-versions')
# Check that we can upgrade to the new Y stream version
result = custom_host.execute('satellite-maintain upgrade list-versions')
assert SATELLITE_VERSION in result.stdout
assert target_version in result.stdout
# Check that the upgrade check fails due to system requirements
result = custom_host.execute(
f'satellite-maintain upgrade check --target-version {SATELLITE_VERSION}', timeout='5m'
f'satellite-maintain upgrade check --target-version {target_version}', timeout='5m'
)
assert (
f'ERROR: The installer is configured to use the {profile} tuning '
Expand Down

0 comments on commit b8ae86b

Please sign in to comment.