mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-29 00:53:09 +00:00
Do not try to login if already done
the comment in console_login was already valid but there was a missing return after test. exemple of incorrect output is: https://openqa.stg.fedoraproject.org/tests/182970#step/_collect_data/4 Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
This commit is contained in:
parent
859f4acf4c
commit
4610408963
10
lib/utils.pm
10
lib/utils.pm
@ -144,12 +144,18 @@ sub console_login {
|
|||||||
|
|
||||||
check_screen [$good, 'text_console_login'], 10;
|
check_screen [$good, 'text_console_login'], 10;
|
||||||
# if we're already logged in, all is good
|
# if we're already logged in, all is good
|
||||||
_console_login_finish() if (match_has_tag $good);
|
if (match_has_tag $good) {
|
||||||
|
_console_login_finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
# if we see the login prompt, type the username
|
# if we see the login prompt, type the username
|
||||||
type_string("$args{user}\n") if (match_has_tag 'text_console_login');
|
type_string("$args{user}\n") if (match_has_tag 'text_console_login');
|
||||||
check_screen [$good, 'console_password_required'], 30;
|
check_screen [$good, 'console_password_required'], 30;
|
||||||
# on a live image, just the user name will be enough
|
# on a live image, just the user name will be enough
|
||||||
_console_login_finish() if (match_has_tag $good);
|
if (match_has_tag $good) {
|
||||||
|
_console_login_finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
# otherwise, type the password if we see the prompt
|
# otherwise, type the password if we see the prompt
|
||||||
if (match_has_tag 'console_password_required') {
|
if (match_has_tag 'console_password_required') {
|
||||||
type_string "$args{password}";
|
type_string "$args{password}";
|
||||||
|
Loading…
Reference in New Issue
Block a user