1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-02-16 12:34:32 +00:00
os-autoinst-distri-fedora/tests/remote_desktop_freerdp.pm
2024-11-20 19:16:26 +01:00

57 lines
1.4 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# 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.107";
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
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");
mutex_unlock("kaermorhen_opened");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: