2024-09-06 12:46:25 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
|
|
my $user = get_var("USER_LOGIN", "test");
|
|
|
|
my $password = get_var("USER_PASSWORD", "weakpassword");
|
|
|
|
|
|
|
|
$self->root_console(tty => 3);
|
|
|
|
# Make necessary settings for the RDP server.
|
|
|
|
# Set SElinux to permissive to workaround a Fedora issue
|
|
|
|
assert_script_run("setenforce 0");
|
|
|
|
# Check that SElinux is in permissive mode
|
|
|
|
validate_script_output("getenforce", sub { m/Permissive/ });
|
|
|
|
|
|
|
|
# In Workstation, the RDP port should be opened per se,
|
|
|
|
# but let's open it explicitely, to make sure it is open.
|
|
|
|
assert_script_run("firewall-cmd --add-port=3389/tcp");
|
|
|
|
|
2024-10-17 14:48:51 +00:00
|
|
|
# Let's also change the hostname so that we can
|
|
|
|
# differentiate later.
|
|
|
|
assert_script_run("hostnamectl set-hostname king");
|
|
|
|
|
2024-09-06 12:46:25 +00:00
|
|
|
# Change to Desktop
|
|
|
|
desktop_vt();
|
|
|
|
|
2024-09-11 08:14:45 +00:00
|
|
|
# Open Settings and navigate to Remote Login
|
2024-09-06 12:46:25 +00:00
|
|
|
menu_launch_type("Settings");
|
2024-09-11 13:29:00 +00:00
|
|
|
send_key("ctrl-f");
|
|
|
|
sleep(2);
|
2024-09-11 08:14:45 +00:00
|
|
|
type_very_safely("system");
|
|
|
|
assert_and_click("settings_system");
|
2024-09-06 12:46:25 +00:00
|
|
|
assert_and_click("settings_remote_desktop");
|
|
|
|
assert_and_click("settings_remote_login");
|
2024-09-11 08:14:45 +00:00
|
|
|
assert_and_click("gnome_button_unlock");
|
|
|
|
if (check_screen("auth_required_password", timeout => 60)) {
|
|
|
|
type_very_safely("$password\n");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
die("Authentication dialogue is not visible but was expected.");
|
|
|
|
}
|
|
|
|
|
|
|
|
# Set up remote login in Gnome Settings.
|
|
|
|
assert_and_click("settings_switch_remote");
|
|
|
|
wait_still_screen(3);
|
|
|
|
assert_and_click("settings_remote_username");
|
|
|
|
type_very_safely("remotee");
|
|
|
|
assert_and_click("settings_remote_password");
|
|
|
|
type_very_safely("opensesame");
|
|
|
|
assert_and_click("gnome_reveil_password");
|
|
|
|
wait_still_screen(3);
|
|
|
|
send_key("alt-f4");
|
2024-09-11 13:29:00 +00:00
|
|
|
|
|
|
|
# Check that the service is running.
|
|
|
|
$self->root_console(tty => 3);
|
|
|
|
assert_script_run("ps aux | grep rdp", timeout => 10);
|
|
|
|
|
2024-09-11 08:14:45 +00:00
|
|
|
}
|
2024-09-06 12:46:25 +00:00
|
|
|
|
|
|
|
sub test_flags {
|
2024-09-11 08:14:45 +00:00
|
|
|
return {fatal => 1};
|
2024-09-06 12:46:25 +00:00
|
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|