mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-25 15:23:08 +00:00
Test FreeIPA upgrade on updates
This adds the FreeIPA server and client upgrade tests to a new updates-server-upgrade flavor which fedora_openqa will schedule for updates. This way, we can test whether updates break FreeIPA upgrades, which is a request the FreeIPA team made to me. This has been deployed on staging for the last week or so and appears to work fine. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
aae0041f6f
commit
e931cfa0a5
53
lib/utils.pm
53
lib/utils.pm
@ -345,6 +345,28 @@ sub _repo_setup_compose {
|
|||||||
script_run "cat /etc/yum.repos.d/{fedora,fedora-rawhide,fedora-modular,fedora-rawhide-modular}.repo", 0;
|
script_run "cat /etc/yum.repos.d/{fedora,fedora-rawhide,fedora-modular,fedora-rawhide-modular}.repo", 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub _repo_setup_updates_development {
|
||||||
|
# Fix URL for fedora.repo if this is a development release
|
||||||
|
# This is rather icky, but I can't think of any better way
|
||||||
|
# The problem is that the 'baseurl' line in fedora.repo is
|
||||||
|
# always left as the correct URL for a *stable* release, we
|
||||||
|
# don't change it to the URL for a Branched release while the
|
||||||
|
# release is Branched, as it's too much annoying package work
|
||||||
|
assert_script_run "sed -i -e 's,/releases/,/development/,g' /etc/yum.repos.d/fedora.repo";
|
||||||
|
# Disable updates-testing so other bad updates don't break us
|
||||||
|
assert_script_run "dnf config-manager --set-disabled updates-testing";
|
||||||
|
# https://pagure.io/fedora-repos/issue/70
|
||||||
|
# this is the easiest workaround, it's not wrong as the repo
|
||||||
|
# is empty for branched anyway
|
||||||
|
assert_script_run "dnf config-manager --set-disabled updates";
|
||||||
|
# same for Modular, if appropriate
|
||||||
|
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-modular.repo') {
|
||||||
|
assert_script_run "sed -i -e 's,/releases/,/development/,g' /etc/yum.repos.d/fedora-modular.repo";
|
||||||
|
assert_script_run "dnf config-manager --set-disabled updates-testing-modular";
|
||||||
|
assert_script_run "dnf config-manager --set-disabled updates-modular";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub _repo_setup_updates {
|
sub _repo_setup_updates {
|
||||||
# Appropriate repo setup steps for testing a Bodhi update
|
# Appropriate repo setup steps for testing a Bodhi update
|
||||||
# Check if we already ran, bail if so
|
# Check if we already ran, bail if so
|
||||||
@ -360,27 +382,9 @@ sub _repo_setup_updates {
|
|||||||
# to download.fedoraproject.org/pub/fedora-secondary/...
|
# to download.fedoraproject.org/pub/fedora-secondary/...
|
||||||
script_run "sed -i -e 's,/pub/fedora/linux/,/pub/fedora-secondary/,g' /etc/yum.repos.d/fedora*.repo", 0;
|
script_run "sed -i -e 's,/pub/fedora/linux/,/pub/fedora-secondary/,g' /etc/yum.repos.d/fedora*.repo", 0;
|
||||||
}
|
}
|
||||||
if (get_var("DEVELOPMENT")) {
|
# for non-upgrade tests, we want to do the 'development' changes
|
||||||
# Fix URL for fedora.repo if this is a development release
|
# *before* we set up the update repo...
|
||||||
# This is rather icky, but I can't think of any better way
|
_repo_setup_updates_development if (get_var("DEVELOPMENT") &! get_var("UPGRADE"));
|
||||||
# The problem is that the 'baseurl' line in fedora.repo is
|
|
||||||
# always left as the correct URL for a *stable* release, we
|
|
||||||
# don't change it to the URL for a Branched release while the
|
|
||||||
# release is Branched, as it's too much annoying package work
|
|
||||||
assert_script_run "sed -i -e 's,/releases/,/development/,g' /etc/yum.repos.d/fedora.repo";
|
|
||||||
# Disable updates-testing so other bad updates don't break us
|
|
||||||
assert_script_run "dnf config-manager --set-disabled updates-testing";
|
|
||||||
# https://pagure.io/fedora-repos/issue/70
|
|
||||||
# this is the easiest workaround, it's not wrong as the repo
|
|
||||||
# is empty for branched anyway
|
|
||||||
assert_script_run "dnf config-manager --set-disabled updates";
|
|
||||||
# same for Modular, if appropriate
|
|
||||||
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-modular.repo') {
|
|
||||||
assert_script_run "sed -i -e 's,/releases/,/development/,g' /etc/yum.repos.d/fedora-modular.repo";
|
|
||||||
assert_script_run "dnf config-manager --set-disabled updates-testing-modular";
|
|
||||||
assert_script_run "dnf config-manager --set-disabled updates-modular";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# Set up an additional repo containing the update packages. We do
|
# Set up an additional repo containing the update packages. We do
|
||||||
# this rather than simply running a one-time update because it may
|
# this rather than simply running a one-time update because it may
|
||||||
# be the case that a package from the update isn't installed *now*
|
# be the case that a package from the update isn't installed *now*
|
||||||
@ -404,6 +408,9 @@ sub _repo_setup_updates {
|
|||||||
assert_script_run "git clone https://github.com/fedora-infra/python-fedora.git";
|
assert_script_run "git clone https://github.com/fedora-infra/python-fedora.git";
|
||||||
assert_script_run "PYTHONPATH=python-fedora/ bodhi -D " . get_var("ADVISORY"), 600;
|
assert_script_run "PYTHONPATH=python-fedora/ bodhi -D " . get_var("ADVISORY"), 600;
|
||||||
}
|
}
|
||||||
|
# for upgrade tests, we want to do the 'development' changes *after*
|
||||||
|
# we set up the update repo
|
||||||
|
_repo_setup_updates_development if (get_var("DEVELOPMENT") && get_var("UPGRADE"));
|
||||||
# log the exact packages in the update at test time, with their
|
# log the exact packages in the update at test time, with their
|
||||||
# source packages and epochs. log is uploaded by _advisory_update
|
# source packages and epochs. log is uploaded by _advisory_update
|
||||||
# and used for later comparison by _advisory_post
|
# and used for later comparison by _advisory_post
|
||||||
@ -412,8 +419,8 @@ sub _repo_setup_updates {
|
|||||||
assert_script_run "createrepo .";
|
assert_script_run "createrepo .";
|
||||||
# write a repo config file
|
# write a repo config file
|
||||||
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';
|
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
|
# run an update now (except for upgrade tests)
|
||||||
script_run "dnf -y update", 600;
|
script_run "dnf -y update", 600 unless (get_var("UPGRADE"));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub repo_setup {
|
sub repo_setup {
|
||||||
|
@ -4849,7 +4849,7 @@
|
|||||||
name => "upgrade_server_domain_controller",
|
name => "upgrade_server_domain_controller",
|
||||||
settings => [
|
settings => [
|
||||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||||
{ key => "HDD_1", value => "disk_f%CURRREL%_server_3_x86_64.img" },
|
{ key => "+HDD_1", value => "disk_f%CURRREL%_server_3_x86_64.img" },
|
||||||
{ key => "UPGRADE", value => "1" },
|
{ key => "UPGRADE", value => "1" },
|
||||||
{ key => "TEST_TARGET", value => "COMPOSE" },
|
{ key => "TEST_TARGET", value => "COMPOSE" },
|
||||||
{ key => "PREUPGRADE", value => "role_deploy_domain_controller" },
|
{ key => "PREUPGRADE", value => "role_deploy_domain_controller" },
|
||||||
@ -4867,7 +4867,7 @@
|
|||||||
name => "upgrade_realmd_client",
|
name => "upgrade_realmd_client",
|
||||||
settings => [
|
settings => [
|
||||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||||
{ key => "HDD_1", value => "disk_f%CURRREL%_server_3_x86_64.img" },
|
{ key => "+HDD_1", value => "disk_f%CURRREL%_server_3_x86_64.img" },
|
||||||
{ key => "UPGRADE", value => "1" },
|
{ key => "UPGRADE", value => "1" },
|
||||||
{ key => "TEST_TARGET", value => "COMPOSE" },
|
{ key => "TEST_TARGET", value => "COMPOSE" },
|
||||||
{ key => "PREUPGRADE", value => "realmd_join_sssd" },
|
{ key => "PREUPGRADE", value => "realmd_join_sssd" },
|
||||||
@ -4889,7 +4889,7 @@
|
|||||||
{ key => "USER_LOGIN", value => "test" },
|
{ key => "USER_LOGIN", value => "test" },
|
||||||
{ key => "USER_PASSWORD", value => "weakpassword" },
|
{ key => "USER_PASSWORD", value => "weakpassword" },
|
||||||
{ key => "BOOTFROM", value => "c" },
|
{ key => "BOOTFROM", value => "c" },
|
||||||
{ key => "HDD_1", value => "disk_f%CURRREL%_kde_3_x86_64.img" },
|
{ key => "+HDD_1", value => "disk_f%CURRREL%_kde_3_x86_64.img" },
|
||||||
{ key => "UPGRADE", value => "1" },
|
{ key => "UPGRADE", value => "1" },
|
||||||
{ key => "DESKTOP", value => "kde" },
|
{ key => "DESKTOP", value => "kde" },
|
||||||
{ key => "TEST_TARGET", value => "COMPOSE" },
|
{ key => "TEST_TARGET", value => "COMPOSE" },
|
||||||
|
@ -282,6 +282,30 @@
|
|||||||
},
|
},
|
||||||
test_suite => { name => "realmd_join_sssd" },
|
test_suite => { name => "realmd_join_sssd" },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
group_name => "Fedora Updates",
|
||||||
|
machine => { name => "64bit" },
|
||||||
|
prio => 40,
|
||||||
|
product => {
|
||||||
|
arch => "x86_64",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "updates-server-upgrade",
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
|
test_suite => { name => "upgrade_server_domain_controller" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group_name => "Fedora Updates",
|
||||||
|
machine => { name => "64bit" },
|
||||||
|
prio => 30,
|
||||||
|
product => {
|
||||||
|
arch => "x86_64",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "updates-server-upgrade",
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
|
test_suite => { name => "upgrade_realmd_client" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
group_name => "Fedora Updates",
|
group_name => "Fedora Updates",
|
||||||
machine => { name => "64bit" },
|
machine => { name => "64bit" },
|
||||||
@ -781,6 +805,15 @@
|
|||||||
],
|
],
|
||||||
version => "*",
|
version => "*",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
arch => "x86_64",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "updates-server-upgrade",
|
||||||
|
name => "",
|
||||||
|
settings => [
|
||||||
|
],
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
arch => "ppc64le",
|
arch => "ppc64le",
|
||||||
distri => "fedora",
|
distri => "fedora",
|
||||||
@ -790,6 +823,15 @@
|
|||||||
],
|
],
|
||||||
version => "*",
|
version => "*",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
arch => "ppc64le",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "updates-server-upgrade",
|
||||||
|
name => "",
|
||||||
|
settings => [
|
||||||
|
],
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
arch => "ppc64",
|
arch => "ppc64",
|
||||||
distri => "fedora",
|
distri => "fedora",
|
||||||
@ -799,7 +841,16 @@
|
|||||||
],
|
],
|
||||||
version => "*",
|
version => "*",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
arch => "ppc64",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "updates-server-upgrade",
|
||||||
|
name => "",
|
||||||
|
settings => [
|
||||||
|
],
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
|
{
|
||||||
arch => "aarch64",
|
arch => "aarch64",
|
||||||
distri => "fedora",
|
distri => "fedora",
|
||||||
flavor => "updates-server",
|
flavor => "updates-server",
|
||||||
@ -808,5 +859,14 @@
|
|||||||
],
|
],
|
||||||
version => "*",
|
version => "*",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
arch => "aarch64",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "updates-server-upgrade",
|
||||||
|
name => "",
|
||||||
|
settings => [
|
||||||
|
],
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user