diff --git a/templates b/templates index 45964174..9ec884c8 100755 --- a/templates +++ b/templates @@ -4869,7 +4869,7 @@ { key => "UPGRADE", value => "1" }, { key => "TEST_TARGET", value => "COMPOSE" }, { key => "PREUPGRADE", value => "realmd_join_sssd" }, - { key => "POSTINSTALL", value => "freeipa_webui freeipa_password_change freeipa_client" }, + { key => "POSTINSTALL", value => "_setup_browser freeipa_webui freeipa_password_change freeipa_client" }, { key => "PARALLEL_WITH", value => "upgrade_server_domain_controller" }, { key => "USER_LOGIN", value => "false" }, { key => "GRUB_POSTINSTALL", value => "net.ifnames=0 biosdevname=0" }, @@ -5239,7 +5239,7 @@ { name => "server_cockpit_default", settings => [ - { key => "POSTINSTALL", value => "server_cockpit_default" }, + { key => "POSTINSTALL", value => "_setup_browser server_cockpit_default" }, { key => "USER_LOGIN", value => "false" }, { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "START_AFTER_TEST", value => "install_default_upload" }, diff --git a/tests/_setup_browser.pm b/tests/_setup_browser.pm new file mode 100644 index 00000000..c3262350 --- /dev/null +++ b/tests/_setup_browser.pm @@ -0,0 +1,30 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +sub run { + my $self = shift; + # set up appropriate repositories + repo_setup(); + # use --enablerepo=fedora for Modular compose testing (we need to + # create and use a non-Modular repo to get some packages which + # aren't in Modular Server composes) + my $extraparams = ''; + $extraparams = '--enablerepo=fedora' if (get_var("MODULAR")); + # install a desktop and firefox so we can actually try it + assert_script_run "dnf ${extraparams} -y groupinstall 'base-x'", 300; + # FIXME: this should probably be in base-x...X seems to fail without + assert_script_run "dnf ${extraparams} -y install libglvnd-egl", 160; + # try to avoid random weird font selection happening + assert_script_run "dnf ${extraparams} -y install dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts", 160; + assert_script_run "dnf ${extraparams} -y install firefox", 160; +} + +sub test_flags { + return { fatal => 1, milestone => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/freeipa_webui.pm b/tests/freeipa_webui.pm index aee3e6bb..f142fc92 100644 --- a/tests/freeipa_webui.pm +++ b/tests/freeipa_webui.pm @@ -6,13 +6,6 @@ use freeipa; sub run { my $self = shift; - # On the upgrade path, we don't have firefox / X installed yet - if (get_var("UPGRADE")) { - assert_script_run 'dnf -y groupinstall "base-x"', 300; - # FIXME: this should probably be in base-x...X seems to fail without - assert_script_run 'dnf -y install libglvnd-egl', 160; - assert_script_run 'dnf -y install firefox', 160; - } # we're restarting firefox (instead of using the same one from # realmd_join_cockpit) so Firefox's trusted CA store refreshes and # it trusts the web server cert @@ -75,7 +68,7 @@ sub run { } sub test_flags { - return { 'ignore_failure' => 1, 'milestone' => 1 }; + return { 'ignore_failure' => 1 }; } 1; diff --git a/tests/server_cockpit_default.pm b/tests/server_cockpit_default.pm index 3c268972..95461734 100644 --- a/tests/server_cockpit_default.pm +++ b/tests/server_cockpit_default.pm @@ -9,20 +9,7 @@ sub run { assert_script_run 'systemctl is-enabled cockpit.socket'; assert_script_run 'systemctl is-active cockpit.socket'; assert_script_run 'firewall-cmd --query-service cockpit'; - # use compose repo, disable u-t, etc. - repo_setup(); - # use --enablerepo=fedora for Modular compose testing (we need to - # create and use a non-Modular repo to get some packages which - # aren't in Modular Server composes) - my $extraparams = ''; - $extraparams = '--enablerepo=fedora' if (get_var("MODULAR")); - # install a desktop and firefox so we can actually try it - assert_script_run "dnf ${extraparams} -y groupinstall 'base-x'", 300; - # FIXME: this should probably be in base-x...X seems to fail without - assert_script_run "dnf ${extraparams} -y install libglvnd-egl", 160; - # try to avoid random weird font selection happening - assert_script_run "dnf ${extraparams} -y install dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts", 160; - assert_script_run "dnf ${extraparams} -y install firefox", 160; + # test cockpit web UI start start_cockpit(0); # quit firefox (return to console) send_key "ctrl-q";