mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 05:01:25 +00:00
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:
parent
7ab3debd77
commit
83c32fe04e
@ -10,15 +10,25 @@ 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}";
|
||||
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 {
|
||||
my $self = shift;
|
||||
|
3
main.pm
3
main.pm
@ -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')) {
|
||||
|
Loading…
Reference in New Issue
Block a user