Compare commits

...

3 Commits

Author SHA1 Message Date
Lukáš Růžička 911633acad Clean unused needles. 2024-05-03 15:19:54 +02:00
Lukáš Růžička 58fa4c4da1 Add needles. 2024-05-03 15:10:20 +02:00
Lukáš Růžička cd35ae6008 Finish the tests for Gnome (no needle purge) 2024-05-03 15:07:51 +02:00
67 changed files with 176 additions and 510 deletions

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 746,
"ypos": 41,
"width": 126,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_add_network_folder"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 599,
"ypos": 201,
"width": 66,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_button_connect"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 607,
"ypos": 734,
"width": 66,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_button_connect"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 60,
"ypos": 331,
"width": 131,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_ftp_localhost"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 253,
"ypos": 163,
"width": 87,
"height": 67,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_test_file"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 185,
"ypos": 239,
"width": 113,
"height": 13,
"type": "match"
},
{
"xpos": 185,
"ypos": 201,
"width": 106,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_multiple_instances"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"ypos": 106,
"height": 61,
"type": "match",
"width": 71,
"xpos": 572
}
],
"properties": [],
"tags": [
"keyring_open_location"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 605,
"ypos": 106,
"width": 71,
"height": 61,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_open_location"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 6,
"ypos": 188,
"width": 82,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_open_network"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 383,
"ypos": 434,
"width": 134,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_open_when_logged"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 43,
"ypos": 258,
"width": 69,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_passwords_unfold"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 428,
"ypos": 565,
"width": 125,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_remember_forever"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 404,
"ypos": 468,
"width": 132,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_remember_password"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 689,
"ypos": 436,
"width": 21,
"height": 14,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_reveal_password"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

View File

@ -1,16 +0,0 @@
{
"area": [
{
"xpos": 668,
"ypos": 578,
"width": 100,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_save_connect",
"keyring_save_next"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 384,
"ypos": 122,
"width": 130,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_seahorse_details"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,10 +1,10 @@
{
"area": [
{
"xpos": 648,
"ypos": 424,
"width": 65,
"height": 79,
"xpos": 457,
"ypos": 136,
"width": 113,
"height": 22,
"type": "match"
}
],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 339,
"ypos": 105,
"width": 168,
"height": 36,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_seahorse_login_details"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 189,
"ypos": 261,
"width": 27,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_select_ftp"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 446,
"ypos": 236,
"width": 105,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_show_values"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

View File

@ -1,15 +1,15 @@
{
"area": [
{
"xpos": 39,
"ypos": 307,
"width": 40,
"xpos": 587,
"ypos": 507,
"width": 53,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_maps_unfold"
"keyring_sshkey_unlock"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 286,
"ypos": 117,
"width": 77,
"height": 50,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_test_file"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 359,
"ypos": 105,
"width": 142,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"nautilus_connection_established"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 KiB

View File

@ -1,15 +1,15 @@
{
"area": [
{
"xpos": 40,
"ypos": 498,
"width": 112,
"xpos": 260,
"ypos": 608,
"width": 138,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_other_location"
"nautilus_enter_address"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

View File

@ -1,15 +1,15 @@
{
"area": [
{
"xpos": 508,
"ypos": 356,
"width": 76,
"xpos": 81,
"ypos": 558,
"width": 134,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_select_registered"
"nautilus_other_locations"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 382,
"ypos": 434,
"width": 141,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"nautilus_remember_password"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

View File

@ -1,15 +1,15 @@
{
"area": [
{
"xpos": 217,
"ypos": 736,
"width": 82,
"xpos": 586,
"ypos": 493,
"width": 54,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"keyring_location_line"
"nautilus_unlock"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 707,
"ypos": 577,
"width": 46,
"height": 16,
"type": "match"
}
],
"properties": [],
"tags": [
"kde_button_next"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 563,
"ypos": 502,
"width": 42,
"height": 16,
"type": "match"
}
],
"properties": [],
"tags": [
"kde_button_ok"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

View File

@ -26,7 +26,7 @@ sub run {
# Check that it is running (the assertion will fail if not)
assert_script_run("systemctl status sshd.service --no-pager");
# Create the SSH keys for the user.
# Change to the normal user
enter_cmd("su -l $user");

View File

@ -1,91 +0,0 @@
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:

View File

@ -29,7 +29,7 @@ sub connect_localhost {
}
assert_screen("nautilus_connection_established");
send_key("alt-f4");
}
}
else {
die("Unknown desktop");
}
@ -91,7 +91,7 @@ sub run {
type_very_safely("$pass\n");
wait_still_screen(3);
send_key("esc");
# Reconnect without using password. We still should be
# able to log in.
connect_localhost("reconnect");

View File

@ -3,18 +3,62 @@ use strict;
use testapi;
use utils;
# This script will install the necessary things to test the Desktop Keyring on Gnome
# and KDE, i.e.:
# - we will set up the SSHd to accept connections with an SSH key
# - we will create the ssh key for the user
# 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 connect_localhost {
my $user = get_var("USER_LOGIN", "test");
my ($type) = @_;
# Start the terminal application.
if (get_var("DESKTOP") eq "gnome") {
menu_launch_type("terminal");
assert_screen("apps_run_terminal");
}
else {
menu_launch_type("konsole");
assert_screen("konsole_runs");
}
# Use SSH to log onto the localhost without needing
# a password. The log-in process should only require
# the actual command.
type_very_safely("ssh $user");
type_very_safely('@localhost');
send_key("ret");
sleep 2;
if ($type ne "reconnect") {
# Answer yes for the upcoming warning.
type_very_safely("yes\n");
wait_still_screen(2);
# Open the SSH key.
type_very_safely("sshpassword");
# Unlock the password when logged in.
assert_and_click("keyring_open_when_logged");
assert_and_click("keyring_sshkey_unlock");
wait_still_screen(2);
}
# Check that more instances are logged in.
enter_cmd("who\n");
assert_screen("keyring_multiple_instances");
# Exit the terminal app.
enter_cmd("exit");
}
sub run {
my $self = shift;
my $desktop = get_var("DESKTOP");
my $user = get_var("USER") || "test";
my $user = get_var("USER_LOGIN", "test");
my $pass = get_var("USER_PASSWORD", "weakpassword");
# Switch to console
$self->root_console(tty => 3);
# We are still at the root console and for the following steps,
# we will need to perform more set up steps.
# We install the necessary packages.
if ($desktop eq "gnome") {
@ -27,39 +71,39 @@ sub run {
enter_cmd('echo "Host *" >> /etc/ssh/ssh_config.d/30-passwordless.conf');
enter_cmd('echo " PasswordAuthentication no" >> /etc/ssh/ssh_config.d/30-passwordless.conf');
# Enable and start SSHd.
assert_script_run("systemctl enable sshd.service --now");
# Restart the SSHd.
assert_script_run("systemctl restart sshd.service");
# Check that it is running (the assertion will fail if not)
assert_script_run("systemctl status sshd.service --no-pager");
# Create the SSH keys for the user.
# Change to the normal user
enter_cmd("su -l $user");
sleep 1;
# Create the SSH key.
enter_cmd("ssh-keygen");
sleep 1;
# Confirm the location of the key.
send_key("ret");
sleep 1;
# Create a password for the key.
type_very_safely("sshpassword\n");
sleep 1;
type_very_safely("sshpassword\n");
sleep 1;
# Authorize the SSH key.
enter_cmd("su -l $user");
enter_cmd('echo $(cat ~/.ssh/id_ed25519.pub) > ~/.ssh/authorized_keys');
enter_cmd("exit");
# Return to desktop
desktop_vt();
# Use SSH to connect to the localhost.
connect_localhost("connect");
# Reboot the machine, log onto the session again.
$self->root_console(tty => 3);
enter_cmd("reboot");
boot_to_login_screen();
send_key("ret");
type_very_safely("$pass\n");
wait_still_screen(3);
send_key("esc");
# Reconnect without using password. We still should be
# able to log in.
connect_localhost("reconnect");
}
sub test_flags {
return {fatal => 1, milestone => 1};
return {fatal => 0, always_rollback => 1};
}
1;

View File

@ -1,83 +0,0 @@
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, $cli) = @_;
menu_launch_type($cli);
if ($cli eq "gnome") {
assert_screen("apps_run_terminal");
}
else {
assert_screen("konsole_runs");
}
# Log to the localhost using the SSH.
enter_cmd("ssh ${user}@localhost");
# 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");
# Check who is logged in.
enter_cmd("who");
# 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") {
# Start the Konsole
# 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_passwords_unfold");
assert_and_dclick("keyring_maps_unfold");
assert_and_click("keyring_ftp_localhost");
assert_and_click("keyring_show_values");
assert_screen("keyring_keys_values");
}
else {
# 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_login");
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: