mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-27 04:50:55 +00:00
df2c3cd906
Summary: This adds an upgrade variant of the FreeIPA tests, with only the simplest client enrolment (sssd) for now. The server test starts from the N-1 release and deploys the domain controller role. The client test similarly starts from the N-1 release and, when the server is deployed, enrols as a domain client. Then the server upgrades itself, while the client waits (as the server is its name server). Then the client upgrades itself, while the server does some self-checks. The server then waits for the client to do its checks before decommissioning itself, as usual. So, summary: *deployment* of both server and client occurs on N-1, then both are upgraded, then the actual *checks* occur on N. In my testing, this all more or less works, except the role decommission step fails. This failure seems to be a genuine one so far as I can tell; I intend to file a bug for it soon. Test Plan: Run the new tests, check they work. Run the existing FreeIPA tests (both the compose and the update variants), check they both behave the same. Reviewers: jsedlak, jskladan Reviewed By: jsedlak Subscribers: tflink Differential Revision: https://phab.qa.fedoraproject.org/D1204
51 lines
1.3 KiB
Perl
51 lines
1.3 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
my $release = lc(get_var("VERSION"));
|
|
# disable screen blanking (download can take a long time)
|
|
script_run "setterm -blank 0";
|
|
|
|
# use compose repo
|
|
repo_setup();
|
|
my $params = "-y --releasever=${release}";
|
|
if ($release eq "rawhide") {
|
|
$params .= " --nogpgcheck";
|
|
}
|
|
assert_script_run "dnf ${params} system-upgrade download", 6000;
|
|
|
|
upload_logs "/var/log/dnf.log";
|
|
upload_logs "/var/log/dnf.rpm.log";
|
|
|
|
script_run "dnf system-upgrade reboot", 0;
|
|
# fail immediately if we see a DNF error message, but keep an eye
|
|
# out for the bootloader so we can handle it if requested
|
|
check_screen ["upgrade_fail", "bootloader"], 15;
|
|
die "DNF reported failure" if (match_has_tag "upgrade_fail");
|
|
|
|
# handle bootloader, if requested
|
|
if (get_var("GRUB_POSTINSTALL")) {
|
|
do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"));
|
|
}
|
|
|
|
# decrypt, if encrypted
|
|
if (get_var("ENCRYPT_PASSWORD")) {
|
|
boot_decrypt(60);
|
|
# in encrypted case we need to wait a bit so postinstall test
|
|
# doesn't bogus match on the encryption prompt we just completed
|
|
# before it disappears from view
|
|
sleep 5;
|
|
}
|
|
}
|
|
|
|
|
|
sub test_flags {
|
|
return { fatal => 1 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|