92 lines
2.6 KiB
Perl
92 lines
2.6 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
# This script will check that the password has been added
|
|
# to the system keyring. We will start a wallet application
|
|
# and check that the password is listed in that application.
|
|
|
|
sub ssh_login_localhost {
|
|
my ($user, $pass, $desktop) = @_;
|
|
if ($desktop eq "gnome") {
|
|
menu_launch_type("terminal");
|
|
assert_screen("apps_run_terminal");
|
|
}
|
|
else {
|
|
menu_launch_type("konsole");
|
|
assert_screen("konsole_runs");
|
|
}
|
|
|
|
# Log to the localhost using the SSH.
|
|
type_very_safely("ssh ${user}");
|
|
type_very_safely('@localhost');
|
|
send_key("ret");
|
|
# Confirm to safe the host to known hosts.
|
|
type_very_safely("yes\n");
|
|
sleep 1;
|
|
# Type the password
|
|
type_very_safely("$pass\n");
|
|
sleep 1;
|
|
enter_cmd("clear");
|
|
sleep 1;
|
|
# Check who is logged in.
|
|
enter_cmd("who");
|
|
sleep 1;
|
|
# Check that multiple instances are logged in.
|
|
assert_screen("keyring_multiple_instances");
|
|
# Log out of ssh
|
|
enter_cmd("exit");
|
|
}
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
my $desktop = get_var("DESKTOP");
|
|
my $user = get_var("USER_LOGIN", "test");
|
|
|
|
if ($desktop eq "kde") {
|
|
# Perform SSH login to the computer.
|
|
ssh_login_localhost($user, "sshpassword", $desktop);
|
|
|
|
# Start the KDE wallet application and maximize it.
|
|
menu_launch_type("kwalletmanager");
|
|
assert_screen("kwalletmanager_runs");
|
|
send_key("super-pgup");
|
|
|
|
# Navigate to the stored entry and check that
|
|
# the credentials are stored there.
|
|
assert_and_dclick("keyring_sshkeys_unfold");
|
|
assert_and_dclick("keyring_sshkey_values");
|
|
assert_screen("keyring_keys_values");
|
|
}
|
|
else {
|
|
# Perform SSH login to the computer.
|
|
ssh_login_localhost($user, "sshpassword", $desktop);
|
|
|
|
# Start the Seahorse application and maximize it.
|
|
menu_launch_type("seahorse");
|
|
assert_screen("apps_run_seahorse");
|
|
send_key("super-up");
|
|
|
|
# Navigate to the stored entry and check
|
|
# that the credentials are stored there.
|
|
assert_and_click("keyring_seahorse_ssh");
|
|
assert_and_dclick("keyring_seahorse_details");
|
|
assert_screen("keyring_seahorse_details_shown");
|
|
assert_and_click("keyring_seahorse_show_password");
|
|
assert_screen("keyring_seahorse_password_shown");
|
|
}
|
|
|
|
# Reboot the machine.
|
|
$self->root_console(tty => 3);
|
|
enter_cmd("reboot");
|
|
}
|
|
|
|
sub test_flags {
|
|
return {fatal => 1, milestone => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|