Move install of Firefox into its own milestone module

This reduces duplication, but it also means that if the FreeIPA
web UI module fails, the password change module will pick up
from a point where Firefox is set up and won't fail in a bogus
way because it isn't.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2018-03-23 09:10:51 -07:00
parent 669df14566
commit 4d997d7323
4 changed files with 34 additions and 24 deletions

View File

@ -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" },

30
tests/_setup_browser.pm Normal file
View File

@ -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:

View File

@ -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;

View File

@ -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";