From 4811ad3fae6bf3a05fa31282d5482316aa4933a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Wed, 21 Jul 2021 10:04:36 +0200 Subject: [PATCH] Replace check_shutdown with assert_shutdown The power_off function in desktop_login was not really asserting/checking whether the VM got turned off. However, os-autoinst supports checking whether the VM is turned off via assert_shutdown. This is additionally much more useful than using check_shutdown, which does nothing if the VM is still running. --- tests/desktop_login.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/desktop_login.pm b/tests/desktop_login.pm index fc0492e7..205bc67d 100644 --- a/tests/desktop_login.pm +++ b/tests/desktop_login.pm @@ -180,15 +180,14 @@ sub reboot_system { } sub power_off { - # Powers-off the machine. I am not sure if this is not a useless thing to - # do, because at the moment I do not know about a possibility to assert a - # switched-off VM. + # Powers-off the machine. assert_and_click "system_menu_button"; # in KDE since F34, there's no submenu to access, the button is right here assert_screen ["power_entry", "power_off_entry"]; click_lastmatch; assert_and_click "power_off_entry" if (match_has_tag("power_entry")); assert_and_click "power_off_confirm"; + assert_shutdown; } sub run { @@ -311,7 +310,6 @@ sub run { } # Power off the machine power_off(); - check_shutdown; } sub test_flags {