mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +00:00
Fix up the 'skip update on support server' stuff (a20ea59
)
The previous attempt at this (in a20ea59
) was wrong, because it
meant we didn't create the update repo at all, and we do need
the repo to exist in the support_server test every time (as the
point of the support server is to serve it out via NFS). We just
don't want to *use it on the support_server system itself* if
the releases don't match. So rejig things to do that properly.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
99302c6fd4
commit
f50f6d66b1
11
lib/utils.pm
11
lib/utils.pm
@ -413,13 +413,18 @@ sub _repo_setup_updates {
|
||||
upload_logs "/var/log/updatepkgnames.txt";
|
||||
# create the repo metadata
|
||||
assert_script_run "createrepo .";
|
||||
# write a repo config file
|
||||
# write a repo config file, unless this is the support_server test
|
||||
# and it is running on a different release than the update is for
|
||||
# (in this case we need the repo to exist but do not want to use
|
||||
# it on the actual support_server system)
|
||||
unless (get_var("TEST") eq "support_server" && get_var("VERSION") ne get_var("CURRREL")) {
|
||||
assert_script_run 'printf "[advisory]\nname=Advisory repo\nbaseurl=file:///opt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0" > /etc/yum.repos.d/advisory.repo';
|
||||
# run an update now (except for upgrade tests)
|
||||
script_run "dnf -y update", 600 unless (get_var("UPGRADE"));
|
||||
}
|
||||
# mark via a variable that we've set up the update/task repo and done
|
||||
# all the logging stuff above
|
||||
set_var('_ADVISORY_REPO_DONE', '1');
|
||||
# run an update now (except for upgrade tests)
|
||||
script_run "dnf -y update", 600 unless (get_var("UPGRADE"));
|
||||
}
|
||||
|
||||
sub repo_setup {
|
||||
|
11
main.pm
11
main.pm
@ -276,14 +276,10 @@ sub load_postinstall_tests() {
|
||||
# are checking that an installer image built from the update works and do
|
||||
# not install the update themselves in this manner
|
||||
if (get_var("ADVISORY_OR_TASK") && !get_var("UPGRADE") && !get_var("INSTALL")) {
|
||||
# don't try and install updates on the support server unless the
|
||||
# update is for the same release as the support server disk image
|
||||
if (get_var("TEST") ne "support_server" || get_var("VERSION") eq get_var("CURRREL")) {
|
||||
autotest::loadtest "tests/_advisory_update.pm";
|
||||
# now load the early boot tests again, as _advisory_update reboots
|
||||
_load_early_postinstall_tests(2);
|
||||
}
|
||||
}
|
||||
# from now on, we have fully installed and booted system with root/specified user logged in
|
||||
|
||||
# If there is a post-install test to verify storage configuration worked
|
||||
@ -325,9 +321,10 @@ sub load_postinstall_tests() {
|
||||
# do this for INSTALL test(s); these are checking that an installer image
|
||||
# built from the update works and do not install the update themselves.
|
||||
if (get_var("ADVISORY_OR_TASK") && !get_var("INSTALL")) {
|
||||
# don't try and install updates on the support server unless the
|
||||
# update is for the same release as the support server disk image
|
||||
if (get_var("TEST") ne "support_server" || get_var("VERSION") eq get_var("CURRREL")) {
|
||||
# don't do this for support server unless the update is for the same
|
||||
# release as the support server disk image, as we don't install the
|
||||
# updates on support server when they differ
|
||||
unless (get_var("TEST") eq "support_server" && get_var("VERSION") ne get_var("CURRREL")) {
|
||||
autotest::loadtest "tests/_advisory_post.pm";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user