From b6d4fd7d4c3dd8125576a43a182211dde21479eb Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 28 Mar 2017 17:52:00 -0700 Subject: [PATCH] Don't create user when USER_LOGIN is false, but for KDE install Summary: For some reason, we have `USER_LOGIN` set to 'false' for the KDE package set install test. I really don't know / remember why that would be; I'd think we should create a user and log in as that user to make sure it works properly when installing KDE from the traditional installer. It's not strictly part of the package set test, true, but still, seems worth doing. Also, when `USER_LOGIN` is set to 'false' and the installer runs, we create a user called 'false'. This doesn't seem like what we wanted, so let's not do that. I dunno if there are any other cases besides the KDE one that this commit changes, but still. Test Plan: Run the full test suite and look for weirdness, check KDE package set test works as intended (now creates a user called 'test' and logs in as that user). Reviewers: jsedlak, jskladan Reviewed By: jsedlak Subscribers: tflink Differential Revision: https://phab.qa.fedoraproject.org/D1182 --- templates | 1 - tests/_do_install_and_reboot.pm | 50 +++++++++++++++++---------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/templates b/templates index 8789a937..a4aa0395 100755 --- a/templates +++ b/templates @@ -2099,7 +2099,6 @@ { key => "PACKAGE_SET", value => "kde" }, { key => "POSTINSTALL", value => "_collect_data" }, { key => "REPOSITORY_VARIATION", value => "%LOCATION%" }, - { key => "USER_LOGIN", value => "false" }, ], }, { diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index 951827bf..c9ebae04 100644 --- a/tests/_do_install_and_reboot.pm +++ b/tests/_do_install_and_reboot.pm @@ -60,36 +60,38 @@ sub run { # wait out animation sleep 3; my $user_login = get_var("USER_LOGIN") || "test"; - assert_and_click "anaconda_install_user_creation"; - assert_screen "anaconda_install_user_creation_screen"; - # wait out animation - wait_still_screen 2; - type_very_safely $user_login; - type_very_safely "\t\t\t\t"; - $self->type_user_password(); - wait_screen_change { send_key "tab"; }; - wait_still_screen 2; - $self->type_user_password(); - # even with all our slow typing this still *sometimes* seems to - # miss a character, so let's try again if we have a warning bar. - # But not if we're installing with a switched layout, as those - # will *always* result in a warning bar at this point (see below) - if (!get_var("SWITCHED_LAYOUT") && check_screen "anaconda_warning_bar", 3) { - wait_screen_change { send_key "shift-tab"; }; + unless $user_login eq 'false' { + assert_and_click "anaconda_install_user_creation"; + assert_screen "anaconda_install_user_creation_screen"; + # wait out animation wait_still_screen 2; + type_very_safely $user_login; + type_very_safely "\t\t\t\t"; $self->type_user_password(); wait_screen_change { send_key "tab"; }; wait_still_screen 2; $self->type_user_password(); - } - assert_and_click "anaconda_install_user_creation_make_admin"; - assert_and_click "anaconda_spoke_done"; - # since 20170105, we will get a warning here when the password - # contains non-ASCII characters. Assume only switched layouts - # produce non-ASCII characters, though this isn't strictly true - if (get_var('SWITCHED_LAYOUT') && check_screen "anaconda_warning_bar", 3) { - wait_still_screen 1; + # even with all our slow typing this still *sometimes* seems to + # miss a character, so let's try again if we have a warning bar. + # But not if we're installing with a switched layout, as those + # will *always* result in a warning bar at this point (see below) + if (!get_var("SWITCHED_LAYOUT") && check_screen "anaconda_warning_bar", 3) { + wait_screen_change { send_key "shift-tab"; }; + wait_still_screen 2; + $self->type_user_password(); + wait_screen_change { send_key "tab"; }; + wait_still_screen 2; + $self->type_user_password(); + } + assert_and_click "anaconda_install_user_creation_make_admin"; assert_and_click "anaconda_spoke_done"; + # since 20170105, we will get a warning here when the password + # contains non-ASCII characters. Assume only switched layouts + # produce non-ASCII characters, though this isn't strictly true + if (get_var('SWITCHED_LAYOUT') && check_screen "anaconda_warning_bar", 3) { + wait_still_screen 1; + assert_and_click "anaconda_spoke_done"; + } } # Check username (and hence keyboard layout) if non-English