2015-08-05 06:23:59 +00:00
|
|
|
use base "installedtest";
|
2015-05-13 11:00:46 +00:00
|
|
|
use strict;
|
|
|
|
use testapi;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
2015-05-13 11:00:46 +00:00
|
|
|
|
|
|
|
sub run {
|
2015-07-15 05:00:47 +00:00
|
|
|
my $self = shift;
|
convert upgrade tests to dnf-plugin-system-upgrade
Summary:
This is a first cut which more or less works for now. Issues:
1) We're not really testing the BUILD, here. All the test does
is try and upgrade to the specified VERSION - so it'll be using
the latest 'stable' for the given VERSION at the time the test
runs. This isn't really that terrible, but especially for TC/RC
validation, we might want to make things a bit more elaborate
and set up the repo for the actual BUILD (and disable the main
repos).
2) We'd actually need --nogpgcheck for non-Rawhide, at one
specific point in the release cycle - after Branching but
before Bodhi activation (which is when we can be sure all
packages are signed). This won't matter until 24 branches, and
maybe releng will have it fixed by then...if not, I'll tweak
it.
3) We don't really test that the upgrade actually *happened*
for desktop, at the moment - the only thing in the old test
that really checked that was where we checked for the fedup
boot menu entry, but that has no analog in dnf. What we should
probably do is check that GUI login works, then switch to a
console and check /etc/fedora-release just as the minimal test
does.
Test Plan:
Run the tests. Note that creating the desktop disk
image doesn't work ATM, so I can't verify the desktop test
works, but the minimal one seems to (with D565). There'll be
a matching diff for openqa_fedora_tools to update the test
case names there.
Reviewers: jskladan, garretraziel
Reviewed By: jskladan, garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D567
2015-09-10 21:49:13 +00:00
|
|
|
# upgrader should be installed on up-to-date system
|
2020-05-27 02:04:57 +00:00
|
|
|
my $version = get_var("UP1REL");
|
2020-03-12 16:30:51 +00:00
|
|
|
# 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) {
|
2020-05-07 22:42:08 +00:00
|
|
|
$version = get_var("UP2REL");
|
2020-03-12 16:30:51 +00:00
|
|
|
}
|
2024-01-06 00:22:01 +00:00
|
|
|
# setup the workarounds repository for the pre-upgrade release,
|
|
|
|
# in case we need workarounds for that environment
|
|
|
|
setup_repos(waonly => 1, version => $version);
|
2022-09-15 17:13:56 +00:00
|
|
|
# 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);
|
2024-08-20 18:25:15 +00:00
|
|
|
# disable openh264 repo, otherwise stuff from it might cause
|
|
|
|
# trouble when it's disabled by repo_setup later
|
|
|
|
assert_script_run "rm -f /etc/yum.repos.d/fedora-cisco-openh264.repo";
|
2017-03-22 13:06:03 +00:00
|
|
|
assert_script_run 'dnf -y update --refresh', 1800;
|
2016-10-20 16:24:48 +00:00
|
|
|
script_run "reboot", 0;
|
2015-05-13 11:00:46 +00:00
|
|
|
|
Test upgrade of FreeIPA server and client deployment
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
2017-05-17 19:39:45 +00:00
|
|
|
# handle bootloader, if requested
|
|
|
|
if (get_var("GRUB_POSTINSTALL")) {
|
2022-07-28 20:32:57 +00:00
|
|
|
do_bootloader(postinstall => 1, params => get_var("GRUB_POSTINSTALL"), timeout => 120);
|
Test upgrade of FreeIPA server and client deployment
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
2017-05-17 19:39:45 +00:00
|
|
|
}
|
|
|
|
|
2016-07-08 15:56:57 +00:00
|
|
|
# decrypt if necessary
|
|
|
|
if (get_var("ENCRYPT_PASSWORD")) {
|
2018-05-11 15:56:47 +00:00
|
|
|
boot_decrypt(120);
|
2016-07-08 15:56:57 +00:00
|
|
|
}
|
|
|
|
|
consolidate login waits, use postinstall not entrypoint for base
Summary:
I started out wanting to fix an issue I noticed today where
graphical upgrade tests were failing because they didn't wait
for the graphical login screen properly; the test was sitting
at the 'full Fedora logo' state of plymouth for a long time,
so the current boot_to_login_screen's wait_still_screen was
triggered by it and the function wound up failing on the
assert_screen, because it was still some time before the real
login screen appeared.
So I tweaked the boot_to_login_screen implementation to work
slightly differently (look for a login screen match, *then* -
if we're dealing with a graphical login - wait_still_screen
to defeat the 'old GPU buffer showing login screen' problem
and assert the login screen again). But while working on it,
I figured we really should consolidate all the various places
that handle the bootloader -> login, we were doing it quite
differently in all sorts of different places. And as part of
that, I converted the base tests to use POSTINSTALL (and thus
go through the shared _wait_login tests) instead of handling
boot themselves. As part of *that*, I tweaked main.pm to not
require all POSTINSTALL tests have the _postinstall suffix on
their names, as it really doesn't make sense, and renamed the
tests.
Test Plan: Run all tests, see if they work.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1015
2016-09-27 18:48:15 +00:00
|
|
|
boot_to_login_screen;
|
2022-07-28 20:32:57 +00:00
|
|
|
$self->root_console(tty => 3);
|
2015-05-13 11:00:46 +00:00
|
|
|
|
2016-05-06 20:37:19 +00:00
|
|
|
my $update_command = 'dnf -y install dnf-plugin-system-upgrade';
|
|
|
|
assert_script_run $update_command, 600;
|
2015-05-13 11:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {fatal => 1};
|
2015-05-13 11:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|