From 55a2229e4c2fab573b82b3e3f3d9692d97a2c4ed Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 12 Mar 2020 09:30:51 -0700 Subject: [PATCH] Fix upgrade workaround stuff for upgrade_2 Initial implementation wasn't correct, I forgot CURRREL is not 'the pre-upgrade release version' but just 'the current stable release'. This is a dumb way to figure out the correct release number for this context but off-hand I can't think of a better one. Signed-off-by: Adam Williamson --- tests/upgrade_preinstall.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/upgrade_preinstall.pm b/tests/upgrade_preinstall.pm index a53db0da..29cff0d9 100644 --- a/tests/upgrade_preinstall.pm +++ b/tests/upgrade_preinstall.pm @@ -7,6 +7,12 @@ sub run { my $self = shift; # upgrader should be installed on up-to-date system my $version = get_var("CURRREL"); + # ok this is dumb but I need to fix it fast and can't think of a + # better way in a hurry. We want the pre-upgrade release version. + my $testname = get_var("TEST"); + if (index($testname, "upgrade_2") != -1) { + $version = get_var("PREVREL"); + } setup_workaround_repo $version; assert_script_run 'dnf -y update --refresh', 1800; script_run "reboot", 0;