Compare commits
6 Commits
50021146b8
...
db37a56667
Author | SHA1 | Date |
---|---|---|
Lukáš Růžička | db37a56667 | |
Lukáš Růžička | 67f1a6d073 | |
Lukáš Růžička | ef49ce4cc4 | |
Lukáš Růžička | fdba636913 | |
Lukáš Růžička | 9c763cea27 | |
Lukas Ruzicka | e861de50b1 |
|
@ -1335,6 +1335,20 @@
|
|||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
|
||||
}
|
||||
},
|
||||
"desktop_keyring": {
|
||||
"profiles": {
|
||||
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,
|
||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 20,
|
||||
"fedora-KDE-live-iso-x86_64-*-64bit": 30,
|
||||
"fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
||||
"POSTINSTALL_PATH": "tests/applications/keyring",
|
||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
|
||||
}
|
||||
},
|
||||
"desktop_update_graphical": {
|
||||
"profiles": {
|
||||
"fedora-KDE-live-iso-x86_64-*-64bit": 32,
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
use base "installedtest";
|
||||
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 install an FTP server.
|
||||
# - we will set it up so that logins can be made.
|
||||
# - we will log into the FTP server and make the system to remember the credentials.
|
||||
# - we will restart the machine and check that the credentials are still remembered.
|
||||
# - we will open SeaHorse or KDE Wallet to check that the credentials are stored.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $desktop = get_var("DESKTOP");
|
||||
# Switch to console
|
||||
$self->root_console(tty => 3);
|
||||
|
||||
# We install the necessary packages.
|
||||
assert_script_run("dnf -y install pure-ftpd");
|
||||
if ($desktop eq "gnome") {
|
||||
assert_script_run("dnf -y install seahorse");
|
||||
}
|
||||
|
||||
# Download the configuration file for FTP and unpack it.
|
||||
download_testdata("configuration");
|
||||
assert_script_run("mv -f /home/test/configuration/pure-ftpd.conf /etc/pure-ftpd/");
|
||||
assert_script_run("chown root:root /etc/pure-ftpd/pure-ftpd.conf");
|
||||
assert_script_run("chmod 644 /etc/pure-ftpd/pure-ftpd.conf");
|
||||
|
||||
# Set up the system.
|
||||
# Add a group for the FTP and the user that will own the FTP stuff
|
||||
assert_script_run("groupadd ftpusers");
|
||||
assert_script_run("useradd -g ftpusers -d /dev/null -s /sbin/nologin ftpuser");
|
||||
# Create a directory to hold the FTP content, set rights and create the content.
|
||||
assert_script_run("mkdir /ftpdata");
|
||||
assert_script_run("chown -R ftpuser:ftpusers /ftpdata");
|
||||
assert_script_run("echo 'This is a test file' > /ftpdata/testfile.txt");
|
||||
# Enable the FTP service in the firewall.
|
||||
assert_script_run("firewall-cmd --add-service=ftp --permanent");
|
||||
assert_script_run("firewall-cmd --reload");
|
||||
|
||||
# Set up the FTP server.
|
||||
# Create a virtual FTP user called tucnak.
|
||||
enter_cmd("pure-pw useradd tucnak -u ftpuser -g ftpusers -d /ftpdata");
|
||||
sleep(2);
|
||||
# Set its password, wait between attempts so that the system has time
|
||||
# to react to the input.
|
||||
type_string("weakpassword\n"); # To pass the password entry.
|
||||
sleep(2);
|
||||
type_string("weakpassword\n");
|
||||
sleep(2);
|
||||
# Create PureFTP database to the settings.
|
||||
assert_script_run("pure-pw mkdb");
|
||||
# Check that the settings are done correctly
|
||||
assert_script_run("pure-pw list | egrep 'tucnak\\s+/ftpdata'");
|
||||
assert_script_run("pure-pw show tucnak");
|
||||
|
||||
# Enable and start the server.
|
||||
assert_script_run("systemctl enable pure-ftpd.service --now");
|
||||
|
||||
# Check that it is running (the assertion will fail if not)
|
||||
assert_script_run("systemctl status pure-ftpd.service --no-pager");
|
||||
|
||||
# Return to desktop
|
||||
desktop_vt();
|
||||
|
||||
# Start the file explorer application based on what system we are
|
||||
# running, Gnome or KDE.
|
||||
my $app = "nautilus";
|
||||
my $key = "up";
|
||||
if (get_var("DESKTOP") eq "kde") {
|
||||
$app = "dolphin";
|
||||
$key = "pgup";
|
||||
}
|
||||
menu_launch_type($app);
|
||||
send_key("super-$key");
|
||||
wait_still_screen(3);
|
||||
# Check that it has started
|
||||
if (get_var("DESKTOP") eq "kde") {
|
||||
assert_screen("dolphin_runs");
|
||||
}
|
||||
else {
|
||||
assert_screen("apps_run_files");
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
|
@ -0,0 +1,89 @@
|
|||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This script will
|
||||
# - use the file application to log onto the localhost's
|
||||
# ftp server while we will ask the system to remember the login credentials.
|
||||
# - check that the credentials have been stored in the system
|
||||
# - reboot the computer and check that the system still remembers them
|
||||
# and that we can do the FTP again without credentials.
|
||||
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $desktop = get_var("DESKTOP");
|
||||
if ($desktop eq "kde") {
|
||||
# The Dolphin application is already started, so we begin
|
||||
# with clicking on Network to open the network folders.
|
||||
# We want to add a new connection and go through the
|
||||
# password addition process.
|
||||
assert_and_click("keyring_open_network");
|
||||
assert_and_click("keyring_add_network_folder");
|
||||
assert_and_click("keyring_select_ftp");
|
||||
assert_and_click("kde_button_next");
|
||||
# We will set up the connection.
|
||||
type_very_safely("FTPConnect");
|
||||
send_key("tab");
|
||||
type_very_safely("tucnak");
|
||||
send_key("tab");
|
||||
type_very_safely("127.0.0.1");
|
||||
assert_and_click("keyring_save_connect");
|
||||
# Type password to connect
|
||||
type_very_safely("weakpassword");
|
||||
# Reveal it so that we can check it is correctly
|
||||
# written, when there are failures because of that
|
||||
# (I have seen a couple of mistypes during development).
|
||||
assert_and_click("keyring_reveal_password");
|
||||
assert_and_click("keyring_remember_password");
|
||||
assert_and_click("kde_button_ok");
|
||||
# We have added the network location and an icon
|
||||
# has been created to access it. Click on that icon.
|
||||
assert_and_click("keyring_open_location");
|
||||
# While double click would sometimes fail here, we
|
||||
# want to confirm opening the icon using the
|
||||
# Enter key.
|
||||
send_key("ret");
|
||||
# Check that we have opened the location and that
|
||||
# we can see the FTP content.
|
||||
assert_screen("keyring_test_file");
|
||||
# Close the application.
|
||||
send_key("alt-f4");
|
||||
}
|
||||
else {
|
||||
# The Nautilus application is already started, so we begin
|
||||
# with clicking on Other locations.
|
||||
# We want to add a new connection and go through the
|
||||
# password addition process.
|
||||
assert_and_click("keyring_other_location");
|
||||
assert_and_click("keyring_location_line");
|
||||
type_very_safely("ftp://127.0.0.1");
|
||||
assert_and_click("keyring_button_connect");
|
||||
# We will set up the connection.
|
||||
assert_and_click("keyring_select_registered");
|
||||
send_key("tab");
|
||||
type_very_safely("tucnak");
|
||||
send_key("tab");
|
||||
type_very_safely("weakpassword");
|
||||
# Reveal it so that we can check it is correctly
|
||||
# written, when there are failures because of that
|
||||
# (I have seen a couple of mistypes during development).
|
||||
assert_and_click("keyring_remember_forever");
|
||||
assert_and_click("keyring_button_connect");
|
||||
# Check that we have opened the location and that
|
||||
# we can see the FTP content.
|
||||
assert_screen("keyring_test_file");
|
||||
# Close the application.
|
||||
send_key("alt-f4");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
|
@ -0,0 +1,40 @@
|
|||
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 run {
|
||||
my $self = shift;
|
||||
my $desktop = get_var("DESKTOP");
|
||||
if ($desktop eq "kde") {
|
||||
# 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");
|
||||
}
|
||||
|
||||
# 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:
|
|
@ -0,0 +1,48 @@
|
|||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This script will open the File application and attempt
|
||||
# to reconnect to the FTP server, this time without
|
||||
# having to put credentials into the process.
|
||||
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $pw = get_var("USER_PASSWORD") // "weakpassword";
|
||||
my $desktop = get_var("DESKTOP");
|
||||
my $app = "files";
|
||||
my $key = "up";
|
||||
if ($desktop eq "kde") {
|
||||
$app = "dolphin";
|
||||
$key = "pgup";
|
||||
}
|
||||
# Check that the machine has been rebooted
|
||||
# and log in.
|
||||
boot_to_login_screen();
|
||||
send_key("ret") if (get_var("DESKTOP") eq "gnome");
|
||||
type_very_safely("$pw\n");
|
||||
wait_still_screen(5);
|
||||
|
||||
# Start the file exploring application
|
||||
menu_launch_type($app);
|
||||
send_key("super-$key");
|
||||
|
||||
if ($desktop eq "kde") {
|
||||
# Open the network location and check
|
||||
# that the FTP content is accessible.
|
||||
assert_and_click("keyring_open_network");
|
||||
assert_and_click("keyring_open_location");
|
||||
send_key("ret");
|
||||
assert_screen("keyring_test_file");
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
|
@ -0,0 +1,30 @@
|
|||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This part of the suite tests that Evince can be switched into night mode.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
# Click on the Menu button.
|
||||
assert_and_click("gnome_burger_menu", timeout => 30, button => "left");
|
||||
|
||||
# Click on the Night mode to select it.
|
||||
assert_and_click("evince_toggle_night_mode", button => "left", timeout => 30);
|
||||
|
||||
# The menu stays opened, so hit Esc to dismiss it.
|
||||
send_key("esc");
|
||||
wait_still_screen 2;
|
||||
|
||||
# Check that night mode has been activated.
|
||||
assert_screen("evince_night_mode", timeout => 30);
|
||||
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
Loading…
Reference in New Issue