Add setup to install FTP and make system ready.
This commit is contained in:
parent
e861de50b1
commit
9c763cea27
|
@ -1339,7 +1339,7 @@
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,
|
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,
|
||||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 20,
|
"fedora-Workstation-live-iso-x86_64-*-64bit": 20,
|
||||||
"fedora-KDE-live-iso-x86_64-*-64bit": 32,
|
"fedora-KDE-live-iso-x86_64-*-64bit": 30,
|
||||||
"fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22
|
"fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|
|
@ -19,9 +19,60 @@ sub run {
|
||||||
# We install the FTP server's package.
|
# We install the FTP server's package.
|
||||||
assert_script_run("dnf -y install pure-ftpd");
|
assert_script_run("dnf -y install pure-ftpd");
|
||||||
|
|
||||||
# Now, let us set up the server.
|
# Download the configuration file for FTP and unpack it.
|
||||||
# 1. Create an ftp user
|
download_testdata("configuration");
|
||||||
assert_script_run("pure-pw useradd ");
|
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.
|
||||||
|
assert_script_run("groupadd ftpusers");
|
||||||
|
assert_script_run("useradd -g ftpusers -d /dev/null -s /sbin/nologin ftpuser");
|
||||||
|
assert_script_run("mkdir /ftpdata");
|
||||||
|
assert_script_run("chown -R ftpuser:ftpusers /ftpdata");
|
||||||
|
|
||||||
|
# Set up the FTP server.
|
||||||
|
enter_cmd("pure-pw useradd tucnak -u ftpuser -g ftpusers -d /ftpdata");
|
||||||
|
sleep(2);
|
||||||
|
type_string("weakpassword\n"); # To pass the password entry.
|
||||||
|
sleep(2);
|
||||||
|
type_string("weakpassword\n");
|
||||||
|
sleep(2);
|
||||||
|
# Create the database.
|
||||||
|
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.
|
||||||
|
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 {
|
sub test_flags {
|
||||||
|
|
Loading…
Reference in New Issue