diff --git a/tests/foreman/maintain/test_upgrade.py b/tests/foreman/maintain/test_upgrade.py index a79094f7a6b..5a4e5eb851d 100644 --- a/tests/foreman/maintain/test_upgrade.py +++ b/tests/foreman/maintain/test_upgrade.py @@ -132,10 +132,12 @@ 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 ) + # 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 + if SATELLITE_VERSION == '6.16' and rhel_major == 9: + last_y_stream = '6.16' 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' - ) + 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',