1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-11-08 11:06:00 +00:00
os-autoinst-distri-fedora/tests/_post_network_static.pm
Lukáš Růžička 6154f0ccb8 Create tests for remote desktop connections.
This adds a test for remote connection. It consists of a server part
in which Gnome RDP connection is set up, enabled, and the server is run,
and the client part that uses Connections as a client to connect to the
server.
The test is considered successful when the connection is established
and the user has logged into the system.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/333
2025-10-16 17:33:57 -07:00

42 lines
1.1 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use tapnet;
use utils;
sub run {
my $self = shift;
# stop greenboot to avoid
# https://bugzilla.redhat.com/show_bug.cgi?id=2396605
if (get_var("SUBVARIANT") eq "IoT") {
script_run "systemctl stop greenboot-set-rollback-trigger.service greenboot-healthcheck.service";
}
my ($ip, $hostname) = split(/ /, get_var("POST_STATIC"));
$hostname //= 'localhost.localdomain';
# It is possible on certain tests that the following code will be running
# while we are inside a graphical session. In this case we need to switch
# to the console before we proceed with the network settings.
my $desktop = 0;
unless (check_screen("root_console")) {
$desktop = 1;
$self->root_console(tty => 3);
}
# set up networking
setup_tap_static($ip, $hostname);
# If we have switched to console from a graphical
# environment, here we come back to it.
if ($desktop) {
desktop_vt();
}
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et: