From 4c05f19a9fa7824bd0bda4b8cb94aa4cefb12e50 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 6 Nov 2019 16:43:20 -0800 Subject: [PATCH] Add QA:Testcase_Anaconda_User_Interface_VNC_Vncconnect tests This adds tests for vncconnect, a variation on VNC install using reverse VNC (where the client waits for the server to connect to it). Very similar to the regular-VNC test, but we have to use tigervnc as Boxes doesn't do reverse VNC. Signed-off-by: Adam Williamson --- templates | 51 +++++++++++++++++++++++++++++++ tests/_vncconnect_client_setup.pm | 29 ++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/_vncconnect_client_setup.pm diff --git a/templates b/templates index 1fb9f1c9..ddd93a78 100755 --- a/templates +++ b/templates @@ -821,6 +821,28 @@ }, test_suite => { name => "install_vnc_client" }, }, + { + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "Server-dvd-iso", + version => "*", + }, + test_suite => { name => "install_vncconnect_server" }, + }, + { + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "Server-dvd-iso", + version => "*", + }, + test_suite => { name => "install_vncconnect_client" }, + }, { machine => { name => "64bit" }, prio => 20, @@ -5162,6 +5184,35 @@ { key => "WORKER_CLASS", value => "tap" }, ], }, + { + name => "install_vncconnect_server", + settings => [ + { key => "VNC_SERVER", value => "1" }, + { key => "GRUB", value => "inst.vnc inst.vncconnect=10.0.2.117:5500 net.ifnames=0 biosdevname=0 ip=10.0.2.116::10.0.2.2:255.255.255.0:vnc003.domain.local:eth0:off" }, + # it's important that we set PARALLEL_WITH *here* and + # not for the client test due to mutex locking - we + # want the client test to be the 'parent' as it makes + # the mutex stuff simpler + { key => "PARALLEL_WITH", value => "install_vncconnect_client" }, + { key => "INSTALL_UNLOCK", value => "vncconnect_client_ready" }, + { key => "NICTYPE", value => "tap" }, + { key => "WORKER_CLASS", value => "tap" }, + ], + }, + { + name => "install_vncconnect_client", + settings => [ + { key => "VNC_CLIENT", value => "1" }, + { key => "BOOTFROM", value => "c" }, + { key => "INSTALL", value => "1" }, + { key => "DESKTOP", value => "gnome" }, + { key => "HDD_1", value => "disk_f%CURRREL%_desktop_4_x86_64.img" }, + { key => "PREINSTALL", value => "_graphical_wait_login _vncconnect_client_setup" }, + { key => "GRUB_POSTINSTALL", value => "net.ifnames=0 biosdevname=0" }, + { key => "NICTYPE", value => "tap" }, + { key => "WORKER_CLASS", value => "tap" }, + ], + }, { name => "base_selinux", settings => [ diff --git a/tests/_vncconnect_client_setup.pm b/tests/_vncconnect_client_setup.pm new file mode 100644 index 00000000..018acf8c --- /dev/null +++ b/tests/_vncconnect_client_setup.pm @@ -0,0 +1,29 @@ +use base "installedtest"; +use strict; +use lockapi; +use tapnet; +use testapi; +use utils; + +sub run { + my $self = shift; + $self->root_console(tty=>3); + setup_tap_static('10.0.2.117', 'vnc004.domain.local'); + # 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; + menu_launch_type 'terminal'; + wait_still_screen 5; + type_safely "vncviewer -FullScreen -listen\n"; + mutex_create 'vncconnect_client_ready'; +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: