Finish the KDE stuff without code comments.
This commit is contained in:
parent
fdba636913
commit
ef49ce4cc4
|
@ -26,24 +26,29 @@ sub run {
|
||||||
assert_script_run("chmod 644 /etc/pure-ftpd/pure-ftpd.conf");
|
assert_script_run("chmod 644 /etc/pure-ftpd/pure-ftpd.conf");
|
||||||
|
|
||||||
# Set up the system.
|
# 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("groupadd ftpusers");
|
||||||
assert_script_run("useradd -g ftpusers -d /dev/null -s /sbin/nologin ftpuser");
|
assert_script_run("useradd --system -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("mkdir /ftpdata");
|
||||||
assert_script_run("chown -R ftpuser:ftpusers /ftpdata");
|
assert_script_run("chown -R ftpuser:ftpusers /ftpdata");
|
||||||
assert_script_run("echo 'This is a test file' > /ftpdata/testfile.txt");
|
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 --add-service=ftp --permanent");
|
||||||
assert_script_run("firewall-cmd --reload");
|
assert_script_run("firewall-cmd --reload");
|
||||||
|
|
||||||
# Set up the FTP server.
|
# Set up the FTP server.
|
||||||
|
# Create a virtual FTP user called tucnak.
|
||||||
enter_cmd("pure-pw useradd tucnak -u ftpuser -g ftpusers -d /ftpdata");
|
enter_cmd("pure-pw useradd tucnak -u ftpuser -g ftpusers -d /ftpdata");
|
||||||
sleep(2);
|
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.
|
type_string("weakpassword\n"); # To pass the password entry.
|
||||||
sleep(2);
|
sleep(2);
|
||||||
type_string("weakpassword\n");
|
type_string("weakpassword\n");
|
||||||
sleep(2);
|
sleep(2);
|
||||||
# Create the database.
|
# Create PureFTP database to the settings.
|
||||||
assert_script_run("pure-pw mkdb");
|
assert_script_run("pure-pw mkdb");
|
||||||
|
|
||||||
# Check that the settings are done correctly
|
# Check that the settings are done correctly
|
||||||
assert_script_run("pure-pw list | egrep 'tucnak\\s+/ftpdata'");
|
assert_script_run("pure-pw list | egrep 'tucnak\\s+/ftpdata'");
|
||||||
assert_script_run("pure-pw show tucnak");
|
assert_script_run("pure-pw show tucnak");
|
||||||
|
@ -57,7 +62,8 @@ sub run {
|
||||||
# Return to desktop
|
# Return to desktop
|
||||||
desktop_vt();
|
desktop_vt();
|
||||||
|
|
||||||
# Start the file explorer application.
|
# Start the file explorer application based on what system we are
|
||||||
|
# running, Gnome or KDE.
|
||||||
my $app = "nautilus";
|
my $app = "nautilus";
|
||||||
my $key = "up";
|
my $key = "up";
|
||||||
if (get_var("DESKTOP") eq "kde") {
|
if (get_var("DESKTOP") eq "kde") {
|
||||||
|
@ -65,7 +71,6 @@ sub run {
|
||||||
$key = "pgup";
|
$key = "pgup";
|
||||||
}
|
}
|
||||||
menu_launch_type($app);
|
menu_launch_type($app);
|
||||||
|
|
||||||
send_key("super-$key");
|
send_key("super-$key");
|
||||||
wait_still_screen(3);
|
wait_still_screen(3);
|
||||||
# Check that it has started
|
# Check that it has started
|
||||||
|
@ -75,7 +80,6 @@ sub run {
|
||||||
else {
|
else {
|
||||||
assert_screen("apps_run_files");
|
assert_screen("apps_run_files");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
|
|
@ -24,6 +24,7 @@ sub run {
|
||||||
type_very_safely("127.0.0.1");
|
type_very_safely("127.0.0.1");
|
||||||
assert_and_click("keyring_save_connect");
|
assert_and_click("keyring_save_connect");
|
||||||
type_very_safely("weakpassword");
|
type_very_safely("weakpassword");
|
||||||
|
assert_and_click("keyring_reveal_password");
|
||||||
assert_and_click("keyring_remember_password");
|
assert_and_click("keyring_remember_password");
|
||||||
assert_and_click("kde_button_ok");
|
assert_and_click("kde_button_ok");
|
||||||
assert_and_click("keyring_open_location");
|
assert_and_click("keyring_open_location");
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
use base "installedtest";
|
||||||
|
use strict;
|
||||||
|
use testapi;
|
||||||
|
use utils;
|
||||||
|
|
||||||
|
# This script will check that the password has been added
|
||||||
|
# to the system keyring.
|
||||||
|
|
||||||
|
|
||||||
|
sub run {
|
||||||
|
my $self = shift;
|
||||||
|
menu_launch_type("kwalletmanager");
|
||||||
|
assert_screen("kwalletmanager_runs");
|
||||||
|
send_key("super-pgup");
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
$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,41 @@
|
||||||
|
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 $app = "files";
|
||||||
|
if (get_var("DESKTOP") eq "kde") {
|
||||||
|
$app = "dolphin";
|
||||||
|
}
|
||||||
|
boot_to_login_screen();
|
||||||
|
send_key("ret") if (get_var("DESKTOP") eq "gnome");
|
||||||
|
type_very_safely("$pw\n");
|
||||||
|
wait_still_screen(5);
|
||||||
|
|
||||||
|
menu_launch_type($app);
|
||||||
|
|
||||||
|
send_key("super-pgup");
|
||||||
|
|
||||||
|
|
||||||
|
assert_and_click("keyring_open_network");
|
||||||
|
assert_and_click("keyring_open_location");
|
||||||
|
send_key("ret");
|
||||||
|
assert_screen("keyring_test_file");
|
||||||
|
send_key("alt-f4");
|
||||||
|
}
|
||||||
|
|
||||||
|
sub test_flags {
|
||||||
|
return {fatal => 1, milestone => 1};
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
# vim: set sw=4 et:
|
Loading…
Reference in New Issue