Rewrite tests from VNC to RDP
The VNC installation method has been replaced with a similar method based on RDP. This PR uses the old mechanism and alters it for the RDP method. The test suite consists of two parts, a server and a client part. The server is the real test on which Fedora Custom installation is performed from the client via RDP. The client is spinned off the pre-installed desktop image. Fixes #345
@ -87,6 +87,8 @@ it also means that `B` conflicts `A` even if not shown in the table).
|
||||
| `_SECRET_BUGZILLA_PASSWORD` | string | not set | used with `BUGZILLA_LOGIN` | This is used to store a password string which does not get exposed in log files. |
|
||||
| `_SECRET_BUGZILLA_APIKEY` | string | not set | used with other secrets | This is used to store an API key which does not get exposed in log files. |
|
||||
| `USE_CUPS` | boolean | `false`/not set | if set, the desktop printing test will use cups-pdf instead of the generic method |
|
||||
| `RDP_SERVER` | boolean | `false`/not set | set to identify an RDP server which will modify the script path for installation tests |
|
||||
| `RDP_CLIENT` | boolean | `false`/not set | set to identify an RDP client which will modify the script path for installation tests |
|
||||
|
||||
Run variables
|
||||
-------------
|
||||
|
18
lib/utils.pm
@ -961,6 +961,24 @@ sub gnome_initial_setup {
|
||||
wait_screen_change { assert_and_click ["next_button"]; };
|
||||
}
|
||||
}
|
||||
unless (get_var("RDP_CLIENT") || $args{live} || $relnum > 39) {
|
||||
# We should be at the GOA screen, except on RDP_CLIENT case
|
||||
# where network isn't working yet. click 'Skip' one time. If
|
||||
# it's not visible we may have hit
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1997310 , which
|
||||
# we'll handle as a soft failure
|
||||
# This screen was removed from g-i-s in Jan 2024:
|
||||
# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/221
|
||||
# so we don't see it on F40+, and can drop this block when
|
||||
# F39 is EOL
|
||||
mouse_set(100, 100);
|
||||
if (check_screen "skip_button", 60) {
|
||||
wait_screen_change { click_lastmatch; };
|
||||
}
|
||||
else {
|
||||
record_soft_failure "GOA screen not seen! Likely RHBZ #1997310";
|
||||
}
|
||||
}
|
||||
send_key "shift-tab" if ($args{live} && $args{livetry});
|
||||
# on the 'live' flow, this will launch the installer
|
||||
send_key "ret";
|
||||
|
8
main.pm
@ -156,8 +156,8 @@ sub load_install_tests() {
|
||||
# boot phase is loaded automatically every time
|
||||
autotest::loadtest "tests/_boot_to_anaconda.pm";
|
||||
|
||||
# if this is a kickstart or VNC install, that's all folks
|
||||
return if (get_var("KICKSTART") || get_var("VNC_SERVER"));
|
||||
# if this is a kickstart or RDP install, that's all folks
|
||||
return if (get_var("KICKSTART") || get_var("RDP_SERVER"));
|
||||
|
||||
# Root password and user creation spokes are suppressed on
|
||||
# Workstation live install and Silverblue DVD install, so we do
|
||||
@ -273,8 +273,8 @@ sub load_postinstall_tests() {
|
||||
autotest::loadtest "tests/_memcheck.pm";
|
||||
return;
|
||||
}
|
||||
# VNC client test's work is done once install is complete
|
||||
if (get_var("VNC_CLIENT")) {
|
||||
# RDP client test's work is done once install is complete
|
||||
if (get_var("RDP_CLIENT")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 13,
|
||||
"ypos": 43,
|
||||
"width": 23,
|
||||
"height": 23,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_add_connection"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 33 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 555,
|
||||
"ypos": 556,
|
||||
"width": 96,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_authenticate_button"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 66 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 300,
|
||||
"ypos": 311,
|
||||
"width": 62,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_connect_button"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 614,
|
||||
"ypos": 220,
|
||||
"width": 55,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_connect_button"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 31 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 816,
|
||||
"ypos": 42,
|
||||
"width": 23,
|
||||
"height": 24,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_fullscreen_toggle"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 238 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 475,
|
||||
"ypos": 595,
|
||||
"width": 74,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_no_thanks"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 85 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 60,
|
||||
"ypos": 237,
|
||||
"width": 93,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_type_rdp"
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/connections/connections_type_rdp-20241203.png
Normal file
After Width: | Height: | Size: 70 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 619,
|
||||
"ypos": 219,
|
||||
"width": 47,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_verify_button"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 85 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 349,
|
||||
"ypos": 280,
|
||||
"width": 123,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_verify_screen"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 84 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 352,
|
||||
"ypos": 493,
|
||||
"width": 319,
|
||||
"height": 26,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_welcome"
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/connections/connections_welcome-20241203.png
Normal file
After Width: | Height: | Size: 85 KiB |
@ -2266,6 +2266,37 @@
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"install_rdp_client": {
|
||||
"profiles": {
|
||||
"fedora-Server-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40,
|
||||
"fedora-Server-dvd-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"DESKTOP": "gnome",
|
||||
"HDD_1": "disk_f%CURRREL%_desktop_5_%ARCH%.qcow2",
|
||||
"INSTALL": "1",
|
||||
"NICTYPE": "tap",
|
||||
"PARALLEL_WITH": "install_rdp_server",
|
||||
"PREINSTALL": "_rdp_client_connect_pre _graphical_wait_login _rdp_client_connect",
|
||||
"RDP_CLIENT": "1",
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"install_rdp_server": {
|
||||
"profiles": {
|
||||
"fedora-Server-dvd-iso-aarch64-*-aarch64": 40,
|
||||
"fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40,
|
||||
"fedora-Server-dvd-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
"settings": {
|
||||
"GRUB": "inst.rdp inst.rdp.username=rapunzel inst.rdp.password=towertop net.ifnames=0 biosdevname=0 ip=172.16.2.114::172.16.2.2:255.255.255.0:rdp001.test.openqa.fedoraproject.org:eth0:off",
|
||||
"NICTYPE": "tap",
|
||||
"RDP_SERVER": "1",
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"install_xfs": {
|
||||
"profiles": {
|
||||
"fedora-Server-dvd-iso-aarch64-*-aarch64": 40,
|
||||
|
@ -104,15 +104,15 @@ sub run {
|
||||
$timeout = 120 if (get_var("IS_PXE"));
|
||||
|
||||
# call do_bootloader with postinstall=0, the params, and the mutex,
|
||||
# unless we're a VNC install client (no bootloader there)
|
||||
unless (get_var("VNC_CLIENT")) {
|
||||
# unless we're a RDP install client (no bootloader there)
|
||||
unless (get_var("RDP_CLIENT")) {
|
||||
do_bootloader(postinstall => 0, params => $params, mutex => $mutex, timeout => $timeout);
|
||||
}
|
||||
|
||||
# Read variables for identification tests (see further).
|
||||
my $identification = get_var('IDENTIFICATION');
|
||||
# proceed to installer
|
||||
if (get_var("KICKSTART") || get_var("VNC_SERVER")) {
|
||||
if (get_var("KICKSTART") || get_var("RDP_SERVER")) {
|
||||
# wait for the bootloader *here* - in a test that inherits from
|
||||
# anacondatest - so that if something goes wrong during install,
|
||||
# we get anaconda logs. sleep a bit first so we don't get a
|
||||
@ -123,7 +123,7 @@ sub run {
|
||||
}
|
||||
else {
|
||||
if (get_var("ANACONDA_TEXT")) {
|
||||
# select that we don't want to start VNC; we want to run in text mode
|
||||
# select that we don't want to start RDP; we want to run in text mode
|
||||
if (get_var("SERIAL_CONSOLE")) {
|
||||
# we direct the installer to virtio-console1, and use
|
||||
# virtio-console as a root console
|
||||
|
@ -98,9 +98,9 @@ sub run {
|
||||
die "Error encountered!" if (check_screen "anaconda_error_report");
|
||||
# move the mouse a bit
|
||||
mouse_set 100, 100;
|
||||
# also click, if we're a VNC client, seems just moving mouse
|
||||
# also click, if we're a RDP client, seems just moving mouse
|
||||
# isn't enough to defeat blanking
|
||||
mouse_click if (get_var("VNC_CLIENT"));
|
||||
mouse_click if (get_var("RDP_CLIENT"));
|
||||
mouse_hide;
|
||||
last if (check_screen "anaconda_install_done", $interval);
|
||||
$timeout -= $interval;
|
||||
@ -136,10 +136,10 @@ sub run {
|
||||
# check whether install is affected by
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2268505 ,
|
||||
# soft fail and work around it if so
|
||||
# our approach for taking all these actions doesn't work on VNC
|
||||
# our approach for taking all these actions doesn't work on RDP
|
||||
# installs, fortunately we don't need any of them in that case
|
||||
# yet, so for now let's just flush the list here if we're VNC
|
||||
@actions = () if (get_var("VNC_CLIENT"));
|
||||
# yet, so for now let's just flush the list here if we're RDP
|
||||
@actions = () if (get_var("RDP_CLIENT"));
|
||||
# If we have no actions, let's just go ahead and reboot now,
|
||||
# unless this is memcheck
|
||||
unless (@actions) {
|
||||
|
55
tests/_rdp_client_connect.pm
Normal file
@ -0,0 +1,55 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
# Start terminal, as we will be using the xfreerdp
|
||||
# console tool to connect to the RDP server.
|
||||
menu_launch_type('Connections');
|
||||
# If we see the Welcome screen, dismiss it.
|
||||
if (check_screen("connections_welcome", timeout => 10)) {
|
||||
assert_and_click("connections_no_thanks");
|
||||
}
|
||||
# Add a connection
|
||||
assert_and_click("connections_add_connection");
|
||||
# Fill in the connection details
|
||||
type_very_safely("172.16.2.114");
|
||||
assert_and_click("connections_type_rdp");
|
||||
assert_and_click("connections_connect_button");
|
||||
|
||||
# If a certificate warning is shown, delete the local certificate
|
||||
# and reconnect.
|
||||
if (check_screen("connections_unexpected_cert", timeout => 10)) {
|
||||
assert_and_click("connections_delete_local_cert");
|
||||
assert_and_click("connections_connect_button");
|
||||
}
|
||||
# "Verify" connection.
|
||||
assert_screen("connections_verify_screen");
|
||||
assert_and_click("connections_verify_button");
|
||||
|
||||
# Fill in credentials
|
||||
send_key("tab");
|
||||
type_very_safely("rapunzel");
|
||||
send_key("tab");
|
||||
sleep(1);
|
||||
send_key("tab");
|
||||
sleep(1);
|
||||
type_very_safely("towertop");
|
||||
assert_and_click("connections_authenticate_button");
|
||||
wait_still_screen(5);
|
||||
# Make connection full screen to comply with installation needles.
|
||||
assert_and_click("connections_fullscreen_toggle");
|
||||
|
||||
# The connection should have been established, so let's
|
||||
# check for it.
|
||||
assert_screen("anaconda_select_install_lang");
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
31
tests/_rdp_client_connect_pre.pm
Normal file
@ -0,0 +1,31 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use tapnet;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
boot_to_login_screen(timeout => 300);
|
||||
$self->root_console(tty => 3);
|
||||
setup_tap_static('172.16.2.115', 'rdp002.test.openqa.fedoraproject.org');
|
||||
# test test: check if we can see the server
|
||||
assert_script_run "ping -c 2 172.16.2.114";
|
||||
# We try to connect through Connections which should
|
||||
# be installed by default, however if this is not
|
||||
# the case, we do not want the test to fail, so we will
|
||||
# install the app and record a soft failure.
|
||||
if (script_run("rpm -qa | grep gnome-connections", timeout => 30)) {
|
||||
assert_script_run("dnf install -y gnome-connections", timeout => 120);
|
||||
record_soft_failure("Gnome Connections are not installed.");
|
||||
}
|
||||
desktop_vt;
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|