1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-22 10:23:09 +00:00

Fix text install test for 'use password' now being default

'use password' now seems to be default when creating a user in
text mode, so we need to handle that.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-05-22 15:18:08 -07:00
parent b37ee51bfb
commit e1ffd8aabd
2 changed files with 16 additions and 3 deletions

View File

@ -7,7 +7,7 @@ use Exporter;
use lockapi;
use testapi;
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type start_cockpit repo_setup gnome_initial_setup anaconda_create_user check_desktop_clean download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile bypass_1691487/;
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type start_cockpit repo_setup gnome_initial_setup anaconda_create_user check_desktop_clean download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile bypass_1691487 get_release_number/;
sub run_with_error_check {
my ($func, $error_screen) = @_;
@ -880,3 +880,13 @@ sub bypass_1691487 {
script_run 'echo "trial bypass dup chars brc#1691487"';
}
}
sub get_release_number {
# return the release number; so usually VERSION, but for Rawhide,
# we return RAWREL. This allows us to avoid constantly doing stuff
# like `if ($version eq "Rawhide" || $version > 30)`.
my $version = get_var("VERSION");
my $rawrel = get_var("RAWREL", "Rawhide");
return $rawrel if ($version eq "Rawhide");
return $version
}

View File

@ -61,8 +61,11 @@ sub run {
type_string get_var("USER_LOGIN", "test");
send_key "ret";
wait_still_screen 5;
# typing "4\n" on abrt screen causes system to reboot, so be careful
run_with_error_check(sub {type_string "4\n"}, "anaconda_text_error"); # use password
# from Rawhide-20190503.n.0 (F31) onwards, 'use password' is default
if (get_release_number() > 30) {
# typing "4\n" on abrt screen causes system to reboot, so be careful
run_with_error_check(sub {type_string "4\n"}, "anaconda_text_error"); # use password
}
wait_still_screen 5;
type_string "5\n"; # set password
wait_still_screen 5;