1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-23 06:23:09 +00:00

Compare commits

...

13 Commits

Author SHA1 Message Date
Lukas Ruzicka
aa388920d5 Create a test to connect from a GUI client. 2024-11-08 08:32:50 -08:00
Lukas Ruzicka
3949c81dcf Make slight changes to the Freerdp test. 2024-11-08 08:32:50 -08:00
Lukas Ruzicka
b43a10c3b5 Add to templates. 2024-11-08 08:32:50 -08:00
Lukas Ruzicka
ca3fce3370 Create the basic client file. 2024-11-08 08:32:50 -08:00
Lukas Ruzicka
b33083e7ed Update the server part. 2024-11-08 08:32:50 -08:00
Lukáš Růžička
d5035ba2c2 Check that RDP process is running after set-up 2024-11-08 08:32:50 -08:00
Lukáš Růžička
812ee0706b Add needles to support the test. 2024-11-08 08:32:50 -08:00
Lukáš Růžička
61135e3f5f Write the server script to start RDP 2024-11-08 08:32:50 -08:00
Lukáš Růžička
90d83b529d Fix parallelism 2024-11-08 08:32:50 -08:00
Lukáš Růžička
c1e3103c72 Create test files. 2024-11-08 08:32:50 -08:00
Lukáš Růžička
33de7fe1a6 Add tests to templates. 2024-11-08 08:32:50 -08:00
Adam Williamson
7f75a35bfd Remove VNC install tests
VNC is gone in current Rawhide. As F41 is released now, we won't
hit these tests any more anywhere where they might work (we don't
get a Server DVD image for respins), so let's just drop the tests.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-08 08:29:04 -08:00
Adam Williamson
77d6f3128c Use 'fXX-build' tag repo for Rawhide, not 'rawhide'
The 'rawhide' tag repo used to be just a symlink to the 'fXX-build'
one, but With the on-demand repo changes, that's no longer the
case. It looks like the 'fXX-build' repo gets regenerated more
often than 'rawhide' (which seems to regen every two hours), so
let's use 'fXX-build' instead.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-07 15:19:40 -08:00
26 changed files with 329 additions and 168 deletions

View File

@ -701,8 +701,8 @@ sub _repo_setup_updates {
disable_updates_repos(both => 0) if ($version > $currrel);
# use the buildroot repo on Rawhide: see e.g.
# https://pagure.io/fedora-ci/general/issue/376 for why
if (get_var("VERSION") eq get_var("RAWREL") && get_var("TEST") ne "support_server") {
assert_script_run 'printf "[koji-rawhide]\nname=koji-rawhide\nbaseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/koji-rawhide.repo';
if ($version eq get_var("RAWREL") && get_var("TEST") ne "support_server") {
assert_script_run 'printf "[koji-rawhide]\nname=koji-rawhide\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/koji-rawhide.repo';
}
if (lc(get_var("VERSION")) eq "eln" && get_var("TEST") ne "support_server") {
assert_script_run 'printf "[koji-eln]\nname=koji-eln\nbaseurl=https://kojipkgs.fedoraproject.org/repos/eln-build/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/koji-eln.repo';

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"settings_remote_desktop"
],
"area": [
{
"xpos": 395,
"ypos": 303,
"width": 113,
"height": 21,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"settings_remote_login"
],
"area": [
{
"xpos": 654,
"ypos": 71,
"width": 121,
"height": 23,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"settings_remote_password"
],
"area": [
{
"xpos": 366,
"ypos": 590,
"width": 69,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"settings_remote_username"
],
"area": [
{
"xpos": 366,
"ypos": 535,
"width": 72,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"settings_switch_remote"
],
"area": [
{
"xpos": 366,
"ypos": 208,
"width": 165,
"height": 22,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"settings_system"
],
"area": [
{
"xpos": 67,
"ypos": 164,
"width": 55,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"gnome_button_unlock"
],
"area": [
{
"xpos": 914,
"ypos": 119,
"width": 67,
"height": 19,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"gnome_reveil_password"
],
"area": [
{
"xpos": 833,
"ypos": 591,
"width": 20,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View File

@ -2244,69 +2244,6 @@
"WORKER_CLASS": "tap"
}
},
"install_vnc_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_vnc_server",
"PREINSTALL": "_vnc_client_connect_pre _graphical_wait_login _vnc_client_connect",
"VNC_CLIENT": "1",
"WORKER_CLASS": "tap"
}
},
"install_vnc_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.vnc net.ifnames=0 biosdevname=0 ip=172.16.2.114::172.16.2.2:255.255.255.0:vnc001.test.openqa.fedoraproject.org:eth0:off",
"NICTYPE": "tap",
"VNC_SERVER": "1",
"WORKER_CLASS": "tap"
}
},
"install_vncconnect_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",
"PREINSTALL": "_vncconnect_client_setup_pre _graphical_wait_login _vncconnect_client_setup",
"VNC_CLIENT": "1",
"WORKER_CLASS": "tap"
}
},
"install_vncconnect_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.vnc inst.vncconnect=172.16.2.117:5500 net.ifnames=0 biosdevname=0 ip=172.16.2.116::172.16.2.2:255.255.255.0:vnc003.test.openqa.fedoraproject.org:eth0:off",
"INSTALL_UNLOCK": "vncconnect_client_ready",
"NICTYPE": "tap",
"PARALLEL_WITH": "install_vncconnect_client",
"VNC_SERVER": "1",
"WORKER_CLASS": "tap"
}
},
"install_xfs": {
"profiles": {
"fedora-Server-dvd-iso-aarch64-*-aarch64": 40,
@ -2578,6 +2515,37 @@
"USER_LOGIN": "false"
}
},
"remote_desktop_server": {
"profiles": {
"fedora-Workstation-live-iso-x86_64-*-64bit": 35
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"POSTINSTALL": "remote_desktop_server",
"POST_STATIC": "172.16.2.107 king.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"WORKER_CLASS": "tap"
}
},
"remote_desktop_freerdp": {
"profiles": {
"fedora-Workstation-live-iso-x86_64-*-64bit": 40
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"POSTINSTALL": "remote_desktop_client",
"PARALLEL_WITH": "remote_desktop_server",
"POST_STATIC": "172.16.2.108 pawn.test.openqa.fedoraproject.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"WORKER_CLASS": "tap"
}
},
"rpmostree_overlay": {
"profiles": {
"fedora-CoreOS-colive-iso-x86_64-*-64bit": 20,

View File

@ -59,8 +59,9 @@ sub run {
# add workaround repo if there is one
$params .= "inst.addrepo=workarounds,nfs://172.16.2.110:/mnt/workarounds_repo " if (get_workarounds);
# add tag repo if we're on rawhide
if (get_var("VERSION") eq get_var("RAWREL")) {
$params .= "inst.addrepo=koji-rawhide,https://kojipkgs.fedoraproject.org/repos/rawhide/latest/${arch} ";
my $version = get_var("VERSION");
if ($version eq get_var("RAWREL")) {
$params .= "inst.addrepo=koji-rawhide,https://kojipkgs.fedoraproject.org/repos/f${version}-build/latest/${arch} ";
}
}
if (get_var("ANACONDA_TEXT")) {

View File

@ -1,28 +0,0 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
menu_launch_type('vinagre');
assert_and_click('vinagre_new_connection');
assert_and_click('vinagre_protocol');
assert_and_click('vinagre_protocol_vnc');
send_key('tab');
type_very_safely("172.16.2.114:5901\n");
# this panel likes to move around so make sure we really hit it
while (check_screen 'vinagre_enable_shortcuts') {
assert_and_click('vinagre_enable_shortcuts');
sleep 2;
}
assert_and_click('grant_access');
assert_and_click('vinagre_fullscreen');
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et:

View File

@ -1,26 +0,0 @@
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', 'vnc002.test.openqa.fedoraproject.org');
# test test: check if we can see the server
assert_script_run "ping -c 2 172.16.2.114";
# FIXME Connections is now in the default install, we should
# switch this test to using that
assert_script_run "dnf -y install vinagre", 180;
desktop_vt;
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et:

View File

@ -1,22 +0,0 @@
use base "installedtest";
use strict;
use lockapi;
use testapi;
use utils;
sub run {
my $self = shift;
desktop_launch_terminal;
assert_screen "apps_run_terminal";
wait_still_screen 5;
type_very_safely "vncviewer -FullScreen -listen\n";
mutex_create 'vncconnect_client_ready';
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et:

View File

@ -1,25 +0,0 @@
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.117', 'vnc004.test.openqa.fedoraproject.org');
# install tigervnc (Boxes doesn't do reverse VNC)
assert_script_run "dnf -y install tigervnc", 180;
# take down the firewall
assert_script_run "systemctl stop firewalld";
desktop_vt;
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,56 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test uses a Connections application to establish an
# RDP connection to a remote computer running Gnome Workstation.
sub run {
my $self = shift;
my $user = "";
my $password = "";
my $ip = "";
# Switch to console and perform settings.
$self->root_console(tty => 3);
assert_script_run("hostnamectl set-hostname pawn");
# Return to the desktop
desktop_vt();
# Open the Connections and start the connection.
menu_launch_type("connections");
wait_still_screen(3);
assert_screen("connections_runs");
assert_and_click("connections_add_connection");
type_very_safely($ip);
assert_and_click("gnome_button_connect");
# Log onto the system.
assert_screen("connection_authorization");
assert_and_click("connection_namefield");
type_very_safely($user);
send_key("tab");
send_key("tab");
type_very_safely($password);
assert_and_click("connection_authenticate");
wait_still_screen(3);
send_key("ret");
type_very_safely("$syspw\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");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,51 @@
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 $user = "";
my $password = "";
my $ip = "";
# Switch to console and install the necessary packages.
$self->root_console(tty => 3);
assert_script_run("hostnamectl set-hostname pawn");
assert_script_run("dnf install -y freerdp", timeout => 60);
# Return to the desktop
desktop_vt();
# Open terminal and make a connection to the remote server.
menu_launch_type("terminal");
wait_still_screen(3);
enter_cmd("xfreerdp /:u $user /:p $password /: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("$syspw\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");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,66 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self = shift;
my $user = get_var("USER_LOGIN", "test");
my $password = get_var("USER_PASSWORD", "weakpassword");
$self->root_console(tty => 3);
# Make necessary settings for the RDP server.
# Set SElinux to permissive to workaround a Fedora issue
assert_script_run("setenforce 0");
# Check that SElinux is in permissive mode
validate_script_output("getenforce", sub { m/Permissive/ });
# In Workstation, the RDP port should be opened per se,
# but let's open it explicitely, to make sure it is open.
assert_script_run("firewall-cmd --add-port=3389/tcp");
# Let's also change the hostname so that we can
# differentiate later.
assert_script_run("hostnamectl set-hostname king");
# Change to Desktop
desktop_vt();
# Open Settings and navigate to Remote Login
menu_launch_type("Settings");
send_key("ctrl-f");
sleep(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");
if (check_screen("auth_required_password", timeout => 60)) {
type_very_safely("$password\n");
}
else {
die("Authentication dialogue is not visible but was expected.");
}
# 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("remotee");
assert_and_click("settings_remote_password");
type_very_safely("opensesame");
assert_and_click("gnome_reveil_password");
wait_still_screen(3);
send_key("alt-f4");
# Check that the service is running.
$self->root_console(tty => 3);
assert_script_run("ps aux | grep rdp", timeout => 10);
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et: