mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-09-12 11:27:21 +00:00
This issue appeared when we started testing Rawhide updates, but I only noticed it today. When testing Rawhide updates after Branch point, the upgrade tests upgrade from Branched to Rawhide. On Branched, updates-testing is enabled by default. We only disable it when we reach `upgrade_run`, but by that point we've already done a `dnf -y update` in `upgrade_preinstall` and potentially installed other packages in steps between `upgrade_preinstall` and `upgrade_run`. That can cause problems, like today all FreeIPA upgrade tests on Rawhide are failing because there's a newer freeipa in updates-testing for F37 than is in the current Rawhide compose. Solve this by disabling updates-testing before we do the update in `upgrade_preinstall`. To avoid excessive code duplication, factor out the repo disabling code. We'll do this twice on upgrade tests now, but it shouldn't be a problem. Signed-off-by: Adam Williamson <awilliam@redhat.com>
49 lines
1.3 KiB
Perl
49 lines
1.3 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
# upgrader should be installed on up-to-date system
|
|
my $version = get_var("UP1REL");
|
|
# 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("UP2REL");
|
|
}
|
|
setup_workaround_repo $version;
|
|
# disable updates-testing, this is needed for the case of upgrade
|
|
# from branched to rawhide to ensure we don't get packages from
|
|
# updates-testing for anything we do between here and upgrade_run
|
|
disable_updates_repos(both => 0);
|
|
assert_script_run 'dnf -y update --refresh', 1800;
|
|
script_run "reboot", 0;
|
|
|
|
# handle bootloader, if requested
|
|
if (get_var("GRUB_POSTINSTALL")) {
|
|
do_bootloader(postinstall => 1, params => get_var("GRUB_POSTINSTALL"), timeout => 120);
|
|
}
|
|
|
|
# decrypt if necessary
|
|
if (get_var("ENCRYPT_PASSWORD")) {
|
|
boot_decrypt(120);
|
|
}
|
|
|
|
boot_to_login_screen;
|
|
$self->root_console(tty => 3);
|
|
|
|
my $update_command = 'dnf -y install dnf-plugin-system-upgrade';
|
|
assert_script_run $update_command, 600;
|
|
}
|
|
|
|
|
|
sub test_flags {
|
|
return {fatal => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|