2015-08-05 06:23:59 +00:00
|
|
|
use base "anacondatest";
|
2015-01-26 14:58:07 +00:00
|
|
|
use strict;
|
|
|
|
use testapi;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
|
|
|
use anaconda;
|
2015-01-26 14:58:07 +00:00
|
|
|
|
|
|
|
sub run {
|
2016-05-04 18:53:11 +00:00
|
|
|
my $self = shift;
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
# construct the kernel params. the trick here is to wind up with
|
|
|
|
# spaced params if GRUB or GRUBADD is set, and just spaces if not,
|
2016-05-04 18:53:11 +00:00
|
|
|
# then check if we got all spaces. We wind up with a harmless
|
|
|
|
# extra space if GRUBADD is set but GRUB is not.
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
my $params = "";
|
|
|
|
$params .= get_var("GRUB", "") . " ";
|
|
|
|
$params .= get_var("GRUBADD", "") . " ";
|
2016-05-04 18:53:11 +00:00
|
|
|
# Construct inst.repo arg for REPOSITORY_VARIATION
|
|
|
|
my $repourl = get_var("REPOSITORY_VARIATION");
|
|
|
|
if ($repourl) {
|
2017-01-18 07:15:44 +00:00
|
|
|
$params .= "inst.repo=" . get_full_repo($repourl) . " ";
|
2015-02-04 13:45:37 +00:00
|
|
|
}
|
2018-06-25 00:09:19 +00:00
|
|
|
if (get_var("ANACONDA_TEXT")) {
|
|
|
|
$params .= "inst.text ";
|
|
|
|
}
|
2017-01-16 17:30:14 +00:00
|
|
|
# inst.debug enables memory use tracking
|
|
|
|
$params .= "debug" if get_var("MEMCHECK");
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
# ternary: set $params to "" if it contains only spaces
|
|
|
|
$params = $params =~ /^\s+$/ ? "" : $params;
|
2015-02-04 13:45:37 +00:00
|
|
|
|
2016-05-04 18:53:11 +00:00
|
|
|
# set mutex wait if necessary
|
|
|
|
my $mutex = get_var("INSTALL_UNLOCK");
|
2015-01-27 12:35:27 +00:00
|
|
|
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
# call do_bootloader with postinstall=0, the params, and the mutex
|
2017-01-18 07:15:44 +00:00
|
|
|
do_bootloader(postinstall=>0, params=>$params, mutex=>$mutex);
|
2015-02-04 13:05:20 +00:00
|
|
|
|
2016-05-04 18:53:11 +00:00
|
|
|
# proceed to installer
|
2016-09-19 23:50:42 +00:00
|
|
|
if (get_var("KICKSTART")) {
|
|
|
|
# wait for the bootloader *here* - in a test that inherits from
|
|
|
|
# anacondatest - so that if something goes wrong during install,
|
|
|
|
# we get anaconda logs
|
2018-12-17 22:10:58 +00:00
|
|
|
assert_screen "bootloader", 1800;
|
2016-09-19 23:50:42 +00:00
|
|
|
}
|
|
|
|
else {
|
2016-09-07 08:34:54 +00:00
|
|
|
if (get_var("ANACONDA_TEXT")) {
|
|
|
|
# select that we don't want to start VNC; we want to run in text mode
|
|
|
|
assert_screen "anaconda_use_text_mode", 300;
|
|
|
|
type_string "2\n";
|
|
|
|
# wait for text version of Anaconda main hub
|
|
|
|
assert_screen "anaconda_main_hub_text", 300;
|
|
|
|
} else {
|
|
|
|
# on lives, we have to explicitly launch anaconda
|
|
|
|
if (get_var('LIVE')) {
|
2019-01-04 21:01:36 +00:00
|
|
|
if (get_var('DESKTOP') eq 'gnome') {
|
|
|
|
# workaround RHBZ #1663040 if necessary
|
|
|
|
$self->root_console(timeout=>30);
|
|
|
|
unless (script_run "systemctl --is-failed systemd-hostnamed.service") {
|
|
|
|
record_soft_failure "systemd-hostnamed.service failed - likely RHBZ #1663040";
|
|
|
|
assert_script_run "setenforce Permissive";
|
|
|
|
assert_script_run "systemctl restart systemd-hostnamed.service";
|
|
|
|
desktop_vt;
|
|
|
|
}
|
|
|
|
}
|
2016-09-07 08:34:54 +00:00
|
|
|
assert_and_click "live_start_anaconda_icon", '', 300;
|
|
|
|
}
|
|
|
|
my $language = get_var('LANGUAGE') || 'english';
|
2018-04-25 22:01:43 +00:00
|
|
|
# wait for anaconda to appear; we click to work around
|
|
|
|
# RHBZ #1566066 if it happens
|
|
|
|
assert_and_click "anaconda_select_install_lang", '', 300;
|
2016-09-07 08:34:54 +00:00
|
|
|
# Select install language
|
2016-09-12 17:24:30 +00:00
|
|
|
wait_screen_change { assert_and_click "anaconda_select_install_lang_input"; };
|
|
|
|
type_safely $language;
|
2016-09-07 08:34:54 +00:00
|
|
|
# Needle filtering in main.pm ensures we will only look for the
|
|
|
|
# appropriate language, here
|
|
|
|
assert_and_click "anaconda_select_install_lang_filtered";
|
|
|
|
assert_screen "anaconda_select_install_lang_selected", 3;
|
|
|
|
assert_and_click "anaconda_select_install_lang_continue";
|
2015-01-30 09:35:13 +00:00
|
|
|
|
2018-05-23 23:35:08 +00:00
|
|
|
# wait 60 secs for hub or Rawhide warning dialog to appear.
|
|
|
|
# If the hub appears, return - we're done now. If Rawhide
|
|
|
|
# warning dialog appears, accept it.
|
|
|
|
if (check_screen ["anaconda_rawhide_accept_fate", "anaconda_main_hub"], 60) {
|
|
|
|
if (match_has_tag("anaconda_rawhide_accept_fate")) {
|
|
|
|
assert_and_click "anaconda_rawhide_accept_fate";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
# this is when the hub appeared already, we're done
|
|
|
|
return;
|
|
|
|
}
|
2016-09-07 08:34:54 +00:00
|
|
|
}
|
2018-05-23 23:35:08 +00:00
|
|
|
# This is where we get to if we accepted fate above, *or*
|
|
|
|
# didn't match anything: if the Rawhide warning didn't
|
|
|
|
# show by now it never will, so we'll just wait for the
|
|
|
|
# hub to show up.
|
2016-09-07 08:34:54 +00:00
|
|
|
assert_screen "anaconda_main_hub", 900; #
|
|
|
|
}
|
2015-01-27 12:35:27 +00:00
|
|
|
}
|
2015-01-26 14:58:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sub test_flags {
|
2015-01-28 12:42:34 +00:00
|
|
|
return { fatal => 1 };
|
2015-01-26 14:58:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|