use configured username and password

This commit is contained in:
Trevor Cooper 2024-07-21 15:40:48 -07:00
parent 65fc43060b
commit 9963584380
Signed by: tcooper
GPG Key ID: 52364D7BBCEB35B8

View File

@ -23,7 +23,7 @@ sub run {
assert_script_run "chmod ugo+w /dev/" . $serialdev;
# let's go to another tty and login as regular user
send_key "alt-f2";
console_login(user => "test", password => "weakpassword");
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
assert_script_run "curl -O https://fedorapeople.org/groups/qa/tunirtests.tar.gz";
assert_script_run "tar xvf tunirtests.tar.gz";
assert_script_run "sudo python3 -m unittest tunirtests.atomictests.TestAtomic01Status -v";
@ -45,19 +45,19 @@ sub run {
assert_script_run "sudo python3 -m unittest tunirtests.cloudservice.TestServiceDisable -v";
type_string "sudo reboot\n";
boot_to_login_screen(timeout => 180);
console_login(user => "root", password => "weakpassword");
console_login(user => "root", password => get_var("USER_PASSWORD", "weakpassword"));
# we need to use script_run as regular user again
assert_script_run "sudo chmod ugo+w /dev/" . $serialdev;
# let's go to another tty and login as regular user again
send_key "alt-f2";
console_login(user => "test", password => "weakpassword");
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
_soft_fail_run "tunirtests.testreboot.TestReboot";
assert_script_run "sudo python3 -m unittest tunirtests.cloudservice.TestServiceManipulation -v";
# this test only works properly as a regular user
_soft_fail_run "tunirtests.cloudtests.TestJournalWrittenAfterReboot", 0;
type_string "sudo reboot\n";
boot_to_login_screen(timeout => 180);
console_login(user => "root", password => "weakpassword");
console_login(user => "root", get_var("USER_PASSWORD", "weakpassword"));
# we need to use script_run as regular user again
assert_script_run "sudo chmod ugo+w /dev/" . $serialdev;
# let's go to another tty and login as regular user again