1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-04 11:03:11 +00:00
os-autoinst-distri-fedora/tests/remote_desktop_freerdp.pm
2024-11-28 00:25:59 -08:00

60 lines
1.5 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
use lockapi;
use mmapi;
# This test uses a freerdp connection to a remote computer
# running Gnome Workstation.
sub run {
my $self = shift;
my $rdpuser = "geralt";
my $rdppass = "ciriofcintra";
my $ip = "172.16.2.177";
my $password = get_var("USER_PASSWORD", "weakpassword");
# Switch to console and install the necessary packages.
$self->root_console(tty => 3);
assert_script_run("dnf install -y freerdp", timeout => 60);
# Return to the desktop
desktop_vt();
# Wait until the RDP server is ready and lock parallel connection.
mutex_lock("kaermorhen_opened");
# Open terminal and make a connection to the remote server.
menu_launch_type("terminal");
wait_still_screen(3);
enter_cmd("xfreerdp /u:$rdpuser /p:$rdppass /v:$ip");
# Check that a connection window has appeared.
assert_screen("connection_window");
# Log onto the system.
assert_and_check("connection_login_screen");
send_key("ret");
sleep(2);
type_very_safely("$password\n");
wait_still_screen(2);
# Start the terminal
type_very_safely("terminal\n");
wait_still_screen(3);
# Check that we are on the correct computer.
# We can tell from the terminal prompt.
assert_screen("freerdp_desktop_connected");
# Unlock parallel connection.
mutex_unlock("kaermorhen_opened");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: