From a6e5700854600c6b092898a82125e6919c990a76 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 27 Mar 2023 17:35:22 -0700 Subject: [PATCH] Unset 'last time notification shown' setting for KDE (#2178311) It looks like the desktop_notifications postinstall test on KDE on F38 is failing currently because the notification is being shown during the install_default_upload test that precedes it, so KDE decides not to show it again yet. So, unset the setting that stores the timestamp of the last time the notification was shown. This is similar to a thing we already do for GNOME above. Signed-off-by: Adam Williamson --- tests/desktop_notifications.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/desktop_notifications.pm b/tests/desktop_notifications.pm index 41473069..27f940b1 100644 --- a/tests/desktop_notifications.pm +++ b/tests/desktop_notifications.pm @@ -57,6 +57,19 @@ sub run { console_login(user => 'root', password => get_var('ROOT_PASSWORD', 'weakpassword')); } } + if ($desktop eq 'kde' && get_var("BOOTFROM")) { + # need to login as user for this + script_run 'exit', 0; + console_login(user => get_var('USER_LOGIN', 'test'), password => get_var('USER_PASSWORD', 'weakpassword')); + # unset the 'last time notification was shown' setting in case + # it got shown during install_default_upload: + # https://bugzilla.redhat.com/show_bug.cgi?id=2178311 + script_run 'kwriteconfig5 --file PlasmaDiscoverUpdates --group Global --key LastNotificationTime --delete', 0; + wait_still_screen 5; + script_run 'exit', 0; + console_login(user => 'root', password => get_var('ROOT_PASSWORD', 'weakpassword')); + } + # can't use assert_script_run here as long as we're on tty1 # we don't use isolate per: # https://github.com/systemd/systemd/issues/26364#issuecomment-1424900066