More tweaking for Workstation live scenario

It's really INSTALL_NO_USER, not USER_LOGIN='false'. Also, we
need to make root_console work with no root password, sigh.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2018-03-08 19:22:21 -08:00
parent 7ab3debd77
commit 83c32fe04e
2 changed files with 14 additions and 3 deletions

View File

@ -10,14 +10,24 @@ use testapi;
use utils;
sub root_console {
# Switch to a default or specified TTY and log in as root.
# Switch to a default or specified TTY and log in as root, or
# log in as regular user and sudo if no root password.
my $self = shift;
my %args = (
tty => 1, # what TTY to login to
@_);
send_key "ctrl-alt-f$args{tty}";
console_login;
if (get_var("ROOT_PASSWORD") eq "false") {
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
type_string "sudo su";
type_string get_var("USER_PASSWORD", "weakpassword");
send_key "ret";
assert_screen "root_console";
}
else {
console_login;
}
}
sub post_fail_hook {

View File

@ -148,7 +148,8 @@ sub load_install_tests() {
# respins, so we can't just do this in the templates yet, sadly.
if (get_var('LIVE') && get_var('DESKTOP') eq 'gnome') {
set_var('ROOT_PASSWORD', 'false');
set_var('USER_LOGIN', 'false');
# this is effectively a forced install_no_user
set_var('INSTALL_NO_USER', 'false');
}
if (get_var('ANACONDA_TEXT')) {