diff --git a/VARIABLES.md b/VARIABLES.md index 88fdfdea..d6040d8b 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -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 ------------- diff --git a/lib/utils.pm b/lib/utils.pm index 2382616b..10029ca2 100644 --- a/lib/utils.pm +++ b/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"; diff --git a/main.pm b/main.pm index eb01f67d..ef6e15c5 100644 --- a/main.pm +++ b/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; } diff --git a/needles/gnome/apps/connections/connections_add_connection-20241203.json b/needles/gnome/apps/connections/connections_add_connection-20241203.json new file mode 100644 index 00000000..0c092236 --- /dev/null +++ b/needles/gnome/apps/connections/connections_add_connection-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 13, + "ypos": 43, + "width": 23, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_add_connection" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_add_connection-20241203.png b/needles/gnome/apps/connections/connections_add_connection-20241203.png new file mode 100644 index 00000000..8330d649 Binary files /dev/null and b/needles/gnome/apps/connections/connections_add_connection-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_authenticate_button-20241203.json b/needles/gnome/apps/connections/connections_authenticate_button-20241203.json new file mode 100644 index 00000000..15435f03 --- /dev/null +++ b/needles/gnome/apps/connections/connections_authenticate_button-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 555, + "ypos": 556, + "width": 96, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_authenticate_button" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_authenticate_button-20241203.png b/needles/gnome/apps/connections/connections_authenticate_button-20241203.png new file mode 100644 index 00000000..2fc3ab35 Binary files /dev/null and b/needles/gnome/apps/connections/connections_authenticate_button-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_connect_button-20241203.json b/needles/gnome/apps/connections/connections_connect_button-20241203.json new file mode 100644 index 00000000..71048ca0 --- /dev/null +++ b/needles/gnome/apps/connections/connections_connect_button-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 300, + "ypos": 311, + "width": 62, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_connect_button" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_connect_button-20241203.png b/needles/gnome/apps/connections/connections_connect_button-20241203.png new file mode 100644 index 00000000..38416e4f Binary files /dev/null and b/needles/gnome/apps/connections/connections_connect_button-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_connect_button-verify-20241203.json b/needles/gnome/apps/connections/connections_connect_button-verify-20241203.json new file mode 100644 index 00000000..c8783b1c --- /dev/null +++ b/needles/gnome/apps/connections/connections_connect_button-verify-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 614, + "ypos": 220, + "width": 55, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_connect_button" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_connect_button-verify-20241203.png b/needles/gnome/apps/connections/connections_connect_button-verify-20241203.png new file mode 100644 index 00000000..404215a6 Binary files /dev/null and b/needles/gnome/apps/connections/connections_connect_button-verify-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_fullscreen_toggle-20241203.json b/needles/gnome/apps/connections/connections_fullscreen_toggle-20241203.json new file mode 100644 index 00000000..18f33ec4 --- /dev/null +++ b/needles/gnome/apps/connections/connections_fullscreen_toggle-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 816, + "ypos": 42, + "width": 23, + "height": 24, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_fullscreen_toggle" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_fullscreen_toggle-20241203.png b/needles/gnome/apps/connections/connections_fullscreen_toggle-20241203.png new file mode 100644 index 00000000..c7a3f6e7 Binary files /dev/null and b/needles/gnome/apps/connections/connections_fullscreen_toggle-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_no_thanks-20241203.json b/needles/gnome/apps/connections/connections_no_thanks-20241203.json new file mode 100644 index 00000000..7f6f0967 --- /dev/null +++ b/needles/gnome/apps/connections/connections_no_thanks-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 475, + "ypos": 595, + "width": 74, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_no_thanks" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_no_thanks-20241203.png b/needles/gnome/apps/connections/connections_no_thanks-20241203.png new file mode 100644 index 00000000..7e53b687 Binary files /dev/null and b/needles/gnome/apps/connections/connections_no_thanks-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_type_rdp-20241203.json b/needles/gnome/apps/connections/connections_type_rdp-20241203.json new file mode 100644 index 00000000..e189bf7f --- /dev/null +++ b/needles/gnome/apps/connections/connections_type_rdp-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 60, + "ypos": 237, + "width": 93, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_type_rdp" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_type_rdp-20241203.png b/needles/gnome/apps/connections/connections_type_rdp-20241203.png new file mode 100644 index 00000000..4a5a4888 Binary files /dev/null and b/needles/gnome/apps/connections/connections_type_rdp-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_verify_button-20241203.json b/needles/gnome/apps/connections/connections_verify_button-20241203.json new file mode 100644 index 00000000..41dbe44d --- /dev/null +++ b/needles/gnome/apps/connections/connections_verify_button-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 619, + "ypos": 219, + "width": 47, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_verify_button" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_verify_button-20241203.png b/needles/gnome/apps/connections/connections_verify_button-20241203.png new file mode 100644 index 00000000..4a05d616 Binary files /dev/null and b/needles/gnome/apps/connections/connections_verify_button-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_verify_screen-20241203.json b/needles/gnome/apps/connections/connections_verify_screen-20241203.json new file mode 100644 index 00000000..5124dd67 --- /dev/null +++ b/needles/gnome/apps/connections/connections_verify_screen-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 349, + "ypos": 280, + "width": 123, + "height": 22, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_verify_screen" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_verify_screen-20241203.png b/needles/gnome/apps/connections/connections_verify_screen-20241203.png new file mode 100644 index 00000000..d38eb0f2 Binary files /dev/null and b/needles/gnome/apps/connections/connections_verify_screen-20241203.png differ diff --git a/needles/gnome/apps/connections/connections_welcome-20241203.json b/needles/gnome/apps/connections/connections_welcome-20241203.json new file mode 100644 index 00000000..398f08b2 --- /dev/null +++ b/needles/gnome/apps/connections/connections_welcome-20241203.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 352, + "ypos": 493, + "width": 319, + "height": 26, + "type": "match" + } + ], + "properties": [], + "tags": [ + "connections_welcome" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/connections/connections_welcome-20241203.png b/needles/gnome/apps/connections/connections_welcome-20241203.png new file mode 100644 index 00000000..7e53b687 Binary files /dev/null and b/needles/gnome/apps/connections/connections_welcome-20241203.png differ diff --git a/templates.fif.json b/templates.fif.json index 5645713e..e6b4cd5d 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -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, diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index b39ca316..82aebdf6 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -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 diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index 3dd6a470..264f1bc2 100644 --- a/tests/_do_install_and_reboot.pm +++ b/tests/_do_install_and_reboot.pm @@ -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) { diff --git a/tests/_rdp_client_connect.pm b/tests/_rdp_client_connect.pm new file mode 100644 index 00000000..3f6618cc --- /dev/null +++ b/tests/_rdp_client_connect.pm @@ -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: diff --git a/tests/_rdp_client_connect_pre.pm b/tests/_rdp_client_connect_pre.pm new file mode 100644 index 00000000..6c7ed75f --- /dev/null +++ b/tests/_rdp_client_connect_pre.pm @@ -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: