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
|
|
@ -71,6 +71,7 @@ it also means that `B` conflicts `A` even if not shown in the table).
|
|||
| `INSTALLER_NO_ROOT` | boolean | `false`/not set | nothing | if set, root password is not set via the anaconda spoke (but, for now, will be set by chrooting into the installed system at the end of installation) |
|
||||
| `GRUB` | string | not set | nothing | when set, append this string to kernel line in GRUB |
|
||||
| `GRUBADD` | string | not set | nothing | when set, append this string to kernel line in GRUB, after the `GRUB` string if that one is set too. This is never set by tests; instead it's provided as a way to e.g. run the normal tests with an `updates.img` to test some anaconda change (the scheduler CLI can help you use this feature) |
|
||||
| `GNOME_SCHEMA` | string | not set | nothing | should not conflict with anything | when set with a URL link from which to download a Gnome schema, it will apply this schema before other tests start. Use it to disable idle blanking in Gnome.
|
||||
| `USER_LOGIN` | string | not set | should be used with `USER_PASSWORD` (unless `false`) | when set, user login is set to this value. If not set, default value `test` is used for console installs, no login is done for graphical installs. If set to `false`, no user login will be done |
|
||||
| `USER_PASSWORD` | string | not set | should be used with `USER_LOGIN` | when set, user password is set to this value. If not set, default value `weakpassword` is used for console installs, no login is done for graphical installs |
|
||||
| `TEST_UPDATES` | boolean | `false`/not set | set to indicate that this test checks updates.img loading, so we should check for the expected effect of the updates image used for this testing |
|
||||
|
|
|
|||
34
lib/utils.pm
|
|
@ -6,7 +6,7 @@ use base 'Exporter';
|
|||
use Exporter;
|
||||
use lockapi;
|
||||
use testapi qw(is_serial_terminal :DEFAULT);
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely script_retry desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type prepare_update_mount setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login check_software_start/;
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely script_retry desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type prepare_update_mount setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login check_software_start reboot_system/;
|
||||
|
||||
# We introduce this global variable to hold the list of applications that have
|
||||
# registered during the apps_startstop_test when they have sucessfully run.
|
||||
|
|
@ -1882,4 +1882,36 @@ sub check_software_start {
|
|||
assert_screen("desktop_package_tool_update");
|
||||
}
|
||||
|
||||
# Reboots the system using the desktop environment's
|
||||
# tools to do so. Then it checks that the system has
|
||||
# reached the login screen
|
||||
sub reboot_system {
|
||||
my $desktop = get_var("DESKTOP", "gnome");
|
||||
if ($desktop eq 'i3') {
|
||||
# we are still in i3 if the bar is visible
|
||||
if (check_screen('i3-bar')) {
|
||||
send_key("alt-shift-e");
|
||||
assert_and_click("i3-logout-bar");
|
||||
assert_screen("graphical_login_input");
|
||||
}
|
||||
assert_and_click('lightdm_power_menu');
|
||||
assert_and_click('lightdm_power_menu-reboot');
|
||||
assert_and_click('lightdm_power_menu-reboot-confirm');
|
||||
}
|
||||
|
||||
# Reboots the system and handles everything until the next GDM screen.
|
||||
else {
|
||||
# In a logged in desktop, we access power options through system menu
|
||||
assert_and_click "system_menu_button";
|
||||
# In KDE reboot entry is right here, on GNOME we need to
|
||||
# enter some kind of power option submenu
|
||||
assert_screen ["power_entry", "reboot_entry"];
|
||||
click_lastmatch;
|
||||
assert_and_click "reboot_entry" if (match_has_tag("power_entry"));
|
||||
assert_and_click "restart_confirm";
|
||||
}
|
||||
boot_to_login_screen();
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
|||
7
main.pm
|
|
@ -273,6 +273,7 @@ sub load_postinstall_tests() {
|
|||
autotest::loadtest "tests/_memcheck.pm";
|
||||
return;
|
||||
}
|
||||
|
||||
# RDP client test's work is done once install is complete
|
||||
if (get_var("RDP_CLIENT")) {
|
||||
return;
|
||||
|
|
@ -290,6 +291,12 @@ sub load_postinstall_tests() {
|
|||
autotest::loadtest "tests/_post_network_static.pm";
|
||||
}
|
||||
|
||||
# If we want to modify Gnome session using the schema override,
|
||||
# we will do it now (it has to be after static network config)
|
||||
if (get_var("GNOME_SCHEMA") && get_var("DESKTOP") eq "gnome") {
|
||||
autotest::loadtest("tests/_modify_gnome_desktop.pm");
|
||||
}
|
||||
|
||||
# if scheduler passed an advisory or task ID, update packages from that
|
||||
# advisory or task ID (intended for the updates testing workflow, so we
|
||||
# install the updates to be tested). Don't do this for UPGRADE tests, as
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 553,
|
||||
"ypos": 568,
|
||||
"width": 99,
|
||||
"height": 16,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connection_authenticate"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 72 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 373,
|
||||
"ypos": 391,
|
||||
"width": 91,
|
||||
"height": 23,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connection_username"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/connection_username-20250902.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 617,
|
||||
"ypos": 218,
|
||||
"width": 49,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connection_verify"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/connection_verify-20250902.png
Normal file
|
After Width: | Height: | Size: 102 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 13,
|
||||
"ypos": 44,
|
||||
"width": 24,
|
||||
"height": 24,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_add_connection"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 87 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 470,
|
||||
"ypos": 598,
|
||||
"width": 83,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_nothanks"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/connections_nothanks-20250801.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 508,
|
||||
"ypos": 490,
|
||||
"width": 168,
|
||||
"height": 29,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connections_runs"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/connections_runs-20250801.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"connection_user_password"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 377,
|
||||
"ypos": 446,
|
||||
"width": 93,
|
||||
"height": 25,
|
||||
"type": "match",
|
||||
"match": "90"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/connections_user_password.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 190,
|
||||
"ypos": 245,
|
||||
"width": 148,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
},
|
||||
{
|
||||
"xpos": 426,
|
||||
"ypos": 45,
|
||||
"width": 173,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_connected"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/desktop_connected-20250902.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 148,
|
||||
"ypos": 245,
|
||||
"xpos": 190,
|
||||
"type": "match",
|
||||
"height": 20
|
||||
},
|
||||
{
|
||||
"height": 21,
|
||||
"xpos": 426,
|
||||
"type": "match",
|
||||
"width": 173,
|
||||
"ypos": 45
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_connected"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/desktop_connected-20250908.png
Normal file
|
After Width: | Height: | Size: 324 KiB |
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"xpos": 190,
|
||||
"height": 20,
|
||||
"width": 148,
|
||||
"ypos": 248
|
||||
},
|
||||
{
|
||||
"type": "match",
|
||||
"xpos": 426,
|
||||
"height": 21,
|
||||
"width": 173,
|
||||
"ypos": 45
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_connected"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/desktop_connected-20251001.png
Normal file
|
After Width: | Height: | Size: 330 KiB |
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"xpos": 190,
|
||||
"height": 20,
|
||||
"ypos": 245,
|
||||
"width": 148,
|
||||
"match": 90
|
||||
},
|
||||
{
|
||||
"height": 21,
|
||||
"ypos": 45,
|
||||
"width": 173,
|
||||
"type": "match",
|
||||
"xpos": 426,
|
||||
"click_point": {
|
||||
"xpos": 86.5,
|
||||
"ypos": 10.5
|
||||
},
|
||||
"match": 90
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_connected"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/connections/desktop_connected-20251006.png
Normal file
|
After Width: | Height: | Size: 332 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 270,
|
||||
"ypos": 42,
|
||||
"width": 27,
|
||||
"height": 28,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_button_back"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_button_back-20250801.png
Normal file
|
After Width: | Height: | Size: 143 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 400,
|
||||
"height": 21,
|
||||
"type": "match",
|
||||
"width": 113,
|
||||
"ypos": 276
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_desktop"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_remote_desktop-20250731.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
15
needles/gnome/apps/settings/settings_remote_desktop.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_desktop"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 395,
|
||||
"ypos": 303,
|
||||
"width": 113,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_remote_desktop.png
Normal file
|
After Width: | Height: | Size: 182 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 663,
|
||||
"width": 121,
|
||||
"type": "match",
|
||||
"ypos": 44,
|
||||
"height": 23
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_login"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_remote_login-20250731.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
15
needles/gnome/apps/settings/settings_remote_login.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_login"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 654,
|
||||
"ypos": 71,
|
||||
"width": 121,
|
||||
"height": 23,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_remote_login.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"width": 463,
|
||||
"ypos": 558,
|
||||
"height": 20,
|
||||
"xpos": 367,
|
||||
"click_point": {
|
||||
"xpos": 443.5,
|
||||
"ypos": 10
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_password"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 142 KiB |
15
needles/gnome/apps/settings/settings_remote_password.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_password"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 366,
|
||||
"ypos": 590,
|
||||
"width": 69,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_remote_password.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 491,
|
||||
"type": "match",
|
||||
"ypos": 503,
|
||||
"height": 20,
|
||||
"xpos": 371,
|
||||
"click_point": {
|
||||
"xpos": 476.5,
|
||||
"ypos": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_username"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 61 KiB |
15
needles/gnome/apps/settings/settings_remote_username.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_remote_username"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 366,
|
||||
"ypos": 535,
|
||||
"width": 72,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_remote_username.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 371,
|
||||
"ypos": 179,
|
||||
"width": 542,
|
||||
"type": "match",
|
||||
"height": 22,
|
||||
"click_point": {
|
||||
"xpos": 505,
|
||||
"ypos": 10
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_switch_remote"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_switch_remote-20250731.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
15
needles/gnome/apps/settings/settings_switch_remote.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_switch_remote"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 366,
|
||||
"ypos": 208,
|
||||
"width": 165,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_switch_remote.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
15
needles/gnome/apps/settings/settings_system-20250731.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 49,
|
||||
"height": 20,
|
||||
"ypos": 136,
|
||||
"width": 55,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_system"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_system-20250731.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
15
needles/gnome/apps/settings/settings_system.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"settings_system"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 67,
|
||||
"ypos": 164,
|
||||
"width": 55,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/apps/settings/settings_system.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
15
needles/gnome/gnome_button_connect-20250801.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 311,
|
||||
"ypos": 312,
|
||||
"width": 66,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gnome_button_connect"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/gnome_button_connect-20250801.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
15
needles/gnome/gnome_button_unlock-20250731.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 935,
|
||||
"ypos": 88,
|
||||
"width": 69,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gnome_button_unlock"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/gnome_button_unlock-20250731.png
Normal file
|
After Width: | Height: | Size: 153 KiB |
15
needles/gnome/gnome_button_unlock.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gnome_button_unlock"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 914,
|
||||
"ypos": 119,
|
||||
"width": 67,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/gnome_button_unlock.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
16
needles/gnome/gnome_reboot_confirm-variant-20250805.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 18,
|
||||
"ypos": 435,
|
||||
"type": "match",
|
||||
"width": 53,
|
||||
"xpos": 578
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"DESKTOP-gnome",
|
||||
"gnome_reboot_confirm"
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/gnome_reboot_confirm-variant-20250805.png
Normal file
|
After Width: | Height: | Size: 814 KiB |
15
needles/gnome/gnome_reveal_password.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gnome_reveal_password"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 833,
|
||||
"ypos": 591,
|
||||
"width": 20,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
needles/gnome/gnome_reveal_password.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
|
|
@ -1915,8 +1915,8 @@
|
|||
"REPOSITORY_VARIATION": "%LOCATION%",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"USER_GECOS": "I;'[] <>i[ \"d,. };[,r]",
|
||||
"USER_LOGIN": "test",
|
||||
"USER_PASSWORD": "weakpassword"
|
||||
"USER_LOGIN": "test",
|
||||
"USER_PASSWORD": "weakpassword"
|
||||
}
|
||||
},
|
||||
"install_updates_img_local": {
|
||||
|
|
@ -2209,6 +2209,39 @@
|
|||
"USER_LOGIN": "false"
|
||||
}
|
||||
},
|
||||
"remote_desktop_server": {
|
||||
"profiles": {
|
||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 35
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
||||
"GNOME_SCHEMA": "https://pagure.io/fedora-qa/openqa_testdata/raw/thetree/f/configuration/99_openqa.gschema.override",
|
||||
"NICTYPE": "tap",
|
||||
"POSTINSTALL": "remote_desktop_server",
|
||||
"POST_STATIC": "172.16.2.116 kaermorhen.test.openqa.fedoraproject.org",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"remote_desktop_client": {
|
||||
"profiles": {
|
||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 40
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
||||
"GNOME_SCHEMA": "https://pagure.io/fedora-qa/openqa_testdata/raw/thetree/f/configuration/99_openqa.gschema.override",
|
||||
"NICTYPE": "tap",
|
||||
"POSTINSTALL": "remote_desktop_client",
|
||||
"PARALLEL_WITH": "remote_desktop_server",
|
||||
"POST_STATIC": "172.16.2.117 visimir.test.openqa.fedoraproject.org",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
|
||||
"WORKER_CLASS": "tap"
|
||||
}
|
||||
},
|
||||
"rpmostree_overlay": {
|
||||
"profile_groups": {
|
||||
"coreos-iot-silverblue": 20
|
||||
|
|
|
|||
44
tests/_modify_gnome_desktop.pm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This tests creates a drop-in schema to change the default behaviour of Gnome session.
|
||||
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Setting variables for better clarity
|
||||
my $target_file = "/usr/share/glib-2.0/schemas/99_openqa.gschema.override";
|
||||
my $source_file = get_var("GNOME_SCHEMA"); # We know it exists or we would not be here.
|
||||
|
||||
# Switch to the root console to perform operations
|
||||
$self->root_console(tty => 3);
|
||||
|
||||
# Download the drop-in file, move it to the selected directory
|
||||
# and compile the new schemas.
|
||||
assert_script_run("curl --retry-delay 10 --max-time 30 --retry 5 -o /tmp/schema_file $source_file");
|
||||
assert_script_run("mv /tmp/schema_file $target_file");
|
||||
assert_script_run("glib-compile-schemas /usr/share/glib-2.0/schemas/");
|
||||
|
||||
# Reboot the system.
|
||||
enter_cmd("reboot");
|
||||
|
||||
# Wait to boot
|
||||
boot_to_login_screen(300);
|
||||
|
||||
# Login to the desktop
|
||||
dm_perform_login('gnome', get_var("USER_PASSWORD", "weakpassword"));
|
||||
|
||||
# Verify that we have logged in
|
||||
check_desktop(120);
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
||||
|
||||
|
|
@ -13,8 +13,23 @@ sub run {
|
|||
}
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -174,31 +174,6 @@ sub switch_user {
|
|||
}
|
||||
}
|
||||
|
||||
sub reboot_system {
|
||||
if ($desktop eq 'i3') {
|
||||
# we are still in i3 if the bar is visible
|
||||
if (check_screen('i3-bar')) {
|
||||
logout_user();
|
||||
}
|
||||
assert_and_click('lightdm_power_menu');
|
||||
assert_and_click('lightdm_power_menu-reboot');
|
||||
assert_and_click('lightdm_power_menu-reboot-confirm');
|
||||
}
|
||||
|
||||
# Reboots the system and handles everything until the next GDM screen.
|
||||
else {
|
||||
# In a logged in desktop, we access power options through system menu
|
||||
assert_and_click "system_menu_button";
|
||||
# In KDE reboot entry is right here, on GNOME we need to
|
||||
# enter some kind of power option submenu
|
||||
assert_screen ["power_entry", "reboot_entry"];
|
||||
click_lastmatch;
|
||||
assert_and_click "reboot_entry" if (match_has_tag("power_entry"));
|
||||
assert_and_click "restart_confirm";
|
||||
}
|
||||
boot_to_login_screen();
|
||||
}
|
||||
|
||||
sub power_off {
|
||||
# Powers-off the machine.
|
||||
if (get_var('DESKTOP') eq 'i3') {
|
||||
|
|
|
|||
72
tests/remote_desktop_client.pm
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
use mmapi;
|
||||
use lockapi;
|
||||
|
||||
# This test uses a Connections application to establish an
|
||||
# RDP connection to a remote computer running Gnome Workstation.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $password = get_var("USER_PASSWORD", "weakpassword");
|
||||
my $rdpuser = get_var("RDP_USER", "geralt");
|
||||
my $rdppass = get_var("RDP_PASS", "ciriofcintra");
|
||||
my $ip = get_var("RDP_SERVER_IP", "172.16.2.116");
|
||||
|
||||
# Wait until the RDP server is ready
|
||||
# and lock parallel connection.
|
||||
mutex_lock("kaermorhen_opened");
|
||||
|
||||
# Unlock the session if it has locked in the meantime.
|
||||
if (check_screen("panel_screen_locked")) {
|
||||
send_key("up");
|
||||
sleep(1);
|
||||
type_very_safely("$password\n");
|
||||
}
|
||||
|
||||
# Open the Connections and start the connection.
|
||||
menu_launch_type("connections");
|
||||
wait_still_screen(3);
|
||||
assert_screen("connections_runs");
|
||||
assert_and_click("connections_nothanks");
|
||||
assert_and_click("connections_add_connection");
|
||||
type_very_safely($ip);
|
||||
assert_and_click("gnome_button_connect");
|
||||
|
||||
# Log onto the system.
|
||||
assert_and_click("connection_verify");
|
||||
assert_and_click("connection_username");
|
||||
type_very_safely($rdpuser);
|
||||
assert_and_click("connection_user_password");
|
||||
type_very_safely($rdppass);
|
||||
assert_and_click("connection_authenticate");
|
||||
wait_still_screen(3);
|
||||
send_key("ret");
|
||||
type_very_safely("$password\n");
|
||||
wait_still_screen(2);
|
||||
|
||||
# When SELinux is on, the authentication dialog has appeared.
|
||||
# Wait for it a minute and deal it away.
|
||||
if (check_screen("auth_required_password", timeout => 60)) {
|
||||
type_very_safely("$password\n");
|
||||
}
|
||||
|
||||
# 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("desktop_connected");
|
||||
|
||||
# Unlock the parallel connection
|
||||
mutex_unlock("kaermorhen_opened");
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1, milestone => 1};
|
||||
}
|
||||
1;
|
||||
# vim: set sw=4 et:
|
||||
75
tests/remote_desktop_server.pm
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
use lockapi;
|
||||
use mmapi;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $password = get_var("USER_PASSWORD", "weakpassword");
|
||||
my $rdpuser = get_var("RDP_USER", "geralt");
|
||||
my $rdppass = get_var("RDP_PASS", "ciriofcintra");
|
||||
|
||||
$self->root_console(tty => 3);
|
||||
# Make necessary settings for the RDP server.
|
||||
|
||||
# firewall: check whether the RDP port (3389) is allowed directly
|
||||
# or via the rdp service
|
||||
if (script_run('firewall-cmd --query-port 3389/tcp') != 0 && script_run('firewall-cmd --query-service rdp') != 0) {
|
||||
# If not, let's open the port manually and softfail the test
|
||||
# (we expect the port to be open by default)
|
||||
assert_script_run("firewall-cmd --add-port=3389/tcp");
|
||||
record_soft_failure("The RDP port was not opened, we had to open it manually.");
|
||||
}
|
||||
|
||||
# Change to Desktop
|
||||
desktop_vt();
|
||||
|
||||
# Open Settings and navigate to Remote Login
|
||||
menu_launch_type("Settings");
|
||||
send_key("ctrl-f");
|
||||
wait_still_screen(2);
|
||||
type_very_safely("system");
|
||||
assert_and_click("settings_system");
|
||||
assert_and_click("settings_remote_desktop");
|
||||
assert_and_click("settings_remote_login");
|
||||
assert_and_click("gnome_button_unlock");
|
||||
assert_screen("auth_required_password", timeout => 60);
|
||||
type_very_safely("$password\n");
|
||||
|
||||
# Set up remote login in Gnome Settings.
|
||||
assert_and_click("settings_switch_remote");
|
||||
wait_still_screen(3);
|
||||
assert_and_click("settings_remote_username");
|
||||
type_very_safely($rdpuser);
|
||||
assert_and_click("settings_remote_password");
|
||||
type_very_safely($rdppass);
|
||||
assert_and_click("gnome_reveal_password");
|
||||
wait_still_screen(3);
|
||||
assert_and_click("settings_button_back");
|
||||
send_key("alt-f4");
|
||||
|
||||
# RDP does not allow connections when the user is still logged in
|
||||
# locally, so let's reboot the machine to start from anew.
|
||||
reboot_system();
|
||||
|
||||
|
||||
# Check that the service is running. If the service was not running,
|
||||
# let's record a soft failure and start the RDP service.
|
||||
$self->root_console(tty => 3);
|
||||
if (script_run("systemctl is-active --quiet gnome-remote-desktop")) {
|
||||
record_soft_failure("The Gnome Remote Desktop service is not running, we had to start it manually.");
|
||||
assert_script_run("systemctl enable --now gnome-remote-desktop");
|
||||
}
|
||||
|
||||
# Create mutex to synchronise with the children.
|
||||
mutex_create("kaermorhen_opened");
|
||||
wait_for_children();
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
1;
|
||||
# vim: set sw=4 et:
|
||||