diff --git a/templates-updates.fif.json b/templates-updates.fif.json index 3ef4bdd3..76874298 100644 --- a/templates-updates.fif.json +++ b/templates-updates.fif.json @@ -459,6 +459,15 @@ "updates-desktops": 5 } }, + "desktop_notifications_postinstall_updatetest": { + "profile_groups": { + "updates-desktops": 5 + }, + "settings": { + "BOOTFROM": "c", + "ENTRYPOINT": "desktop_notifications _advisory_post" + } + }, "desktop_printing": { "profile_groups": { "updates-desktops": 5 diff --git a/tests/desktop_notifications.pm b/tests/desktop_notifications.pm index f47cac47..f0ce0f03 100644 --- a/tests/desktop_notifications.pm +++ b/tests/desktop_notifications.pm @@ -22,18 +22,32 @@ sub create_user_i3_config { assert_script_run "restorecon -vr /home/$login/.config"; } -sub run { - my $self = shift; - my $desktop = get_var("DESKTOP"); - my $relnum = get_release_number; - # for the live image case, handle bootloader here +sub _handle_bootloader { + # boot with '3' to get to a console. factored out of run() as + # it's repeated on the update flow if (get_var("BOOTFROM")) { do_bootloader(postinstall => 1, params => '3'); } else { do_bootloader(postinstall => 0, params => '3'); } +} + +sub run { + my $self = shift; + my $desktop = get_var("DESKTOP"); + my $relnum = get_release_number; + _handle_bootloader; boot_to_login_screen; + # do _advisory_update steps on update tests; ensure this stays + # in sync with _advisory_update + if (get_var('ADVISORY_OR_TASK')) { + $self->root_console(tty => 3); + repo_setup; + script_run 'reboot', 0; + _handle_bootloader; + boot_to_login_screen; + } # tty1 is used here for historic reasons, but it's not hurting # anything and changing it might, so let's leave it... $self->root_console(tty => 1); @@ -106,6 +120,8 @@ sub run { assert_screen 'graphical_login', 60; wait_still_screen 10, 30; dm_perform_login($desktop, $password); + # on update flow we encounter welcome screen for first time here + handle_welcome_screen if (get_var('ADVISORY_OR_TASK')); } check_desktop(timeout => 180); # now, WE WAIT. this is just an unconditional wait - rather than