diff --git a/lib/tapnet.pm b/lib/tapnet.pm index 0dfdd225..4ac9539c 100644 --- a/lib/tapnet.pm +++ b/lib/tapnet.pm @@ -29,6 +29,14 @@ sub setup_tap_static { # this is a common thing for tap tests, where we set up networking # for the system with a static IP address and possibly a specific # hostname + + # It seems that this counts on being on root console, + # however, if we are not there, switch first. + my $console = 0; + unless (check_screen("root_console")) { + $console = 1; + $self->root_console(tty => 3); + } my $ip = shift; my $hostname = shift || ""; if ($hostname) { @@ -53,6 +61,10 @@ sub setup_tap_static { assert_script_run "nmcli con up '$connection'"; # for debugging assert_script_run "nmcli -t con show '$connection'"; + # If we have switched here from graphics, go back there. + if ($console) { + desktop_vt(); + } } sub get_host_dns { diff --git a/templates.fif.json b/templates.fif.json index c0d87fe5..f6d35435 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -2524,7 +2524,7 @@ "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", "NICTYPE": "tap", "POSTINSTALL": "remote_desktop_server", - "POST_STATIC": "172.16.2.107 kaermorhen.test.openqa.fedoraproject.org", + "POST_STATIC": "172.16.2.177 kaermorhen.test.openqa.fedoraproject.org", "ROOT_PASSWORD": "weakpassword", "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%", "WORKER_CLASS": "tap" @@ -2540,7 +2540,7 @@ "NICTYPE": "tap", "POSTINSTALL": "remote_desktop_freerdp", "PARALLEL_WITH": "remote_desktop_server", - "POST_STATIC": "172.16.2.108 witcher.test.openqa.fedoraproject.org", + "POST_STATIC": "172.16.2.178 witcher.test.openqa.fedoraproject.org", "ROOT_PASSWORD": "weakpassword", "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%", "WORKER_CLASS": "tap" diff --git a/tests/remote_desktop_freerdp.pm b/tests/remote_desktop_freerdp.pm index e47286f1..79a7268c 100644 --- a/tests/remote_desktop_freerdp.pm +++ b/tests/remote_desktop_freerdp.pm @@ -24,7 +24,7 @@ sub run { # 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"); + enter_cmd("xfreerdp /:u $rdpuser /:p $rdppass /:v $ip"); # Check that a connection window has appeared. assert_screen("connection_window");