mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-22 10:23:09 +00:00
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.
This commit is contained in:
parent
5ed8e33b75
commit
4811ad3fae
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user