Compare commits

...

2 Commits

Author SHA1 Message Date
Adam Williamson 5cd9c83e73 Ensure repos are set up for cockpit tests
When running these tests on updates we inherit the main disk
image from server_cockpit_default, which has the repo config,
but the actual repo data is on HDD_3 which is not inherited.
We need to re-download the updates here to ensure they're
available to the tests (the automatic update test installs the
dnf-automatic package, so it should pull it from the update repo
if it is part of the update being tested).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-04-25 16:52:09 -07:00
Adam Williamson a7ec8ada2b container build test: configure for dnf5
When testing the update that implements the dnf5 switchover, we
need to patch the kiwi config on the fly for dnf5.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-04-25 15:29:15 -07:00
4 changed files with 12 additions and 3 deletions

View File

@ -248,7 +248,6 @@ sub _load_early_postinstall_tests {
# Appropriate login method for install type
if (get_var("DESKTOP")) {
_load_instance("tests/_graphical_wait_login", $instance);
_load_instance("tests/_snapshot_only") if (get_var("LOGIN_SNAPSHOT"));
}
# Test non-US input at this point, on language tests
if (get_var("SWITCHED_LAYOUT") || get_var("INPUT_METHOD")) {
@ -264,7 +263,6 @@ sub _load_early_postinstall_tests {
# the installation is interrupted on purpose.
unless (get_var("DESKTOP") || get_var("CRASH_REPORT")) {
_load_instance("tests/_console_wait_login", $instance);
_load_instance("tests/_snapshot_only") if (get_var("LOGIN_SNAPSHOT"));
}
}

View File

@ -2594,7 +2594,7 @@
"+START_AFTER_TEST": "server_cockpit_default",
"BOOTFROM": "c",
"LOGIN_SNAPSHOT": "1",
"POSTINSTALL": "server_cockpit_updates server_cockpit_autoupdate",
"POSTINSTALL": "_cockpit_setup server_cockpit_updates server_cockpit_autoupdate",
"ROOT_PASSWORD": "weakpassword",
"USER_LOGIN": "false"
}

View File

@ -5,6 +5,8 @@ use utils;
sub run {
my $self = shift;
# for update testing, ensure the update repos are set up
repo_setup if (get_var("ADVISORY_OR_TASK"));
}
sub test_flags {

View File

@ -6,6 +6,7 @@ use utils;
sub run {
my $self = shift;
my $version = get_var("VERSION");
my $advortask = get_var("ADVISORY_OR_TASK");
# we didn't use kiwi before F40, and I don't really want to write
# an imgfac test for a release that will be dead in 6 months
# FIXME drop when F39 is EOL
@ -76,6 +77,14 @@ sub run {
# to mirrorlist
assert_script_run 'sed -i -e "s,/usr/share/distribution-gpg-keys/fedora,/etc/pki/rpm-gpg,g" ' . $repoxml;
repos_mirrorlist $repoxml;
# configure dnf5 if we're testing the dnf5-as-dnf update
# https://pagure.io/fedora-kiwi-descriptions/pull-request/46 is
# the corresponding PR, drop this once the update is pushed
if ($advortask eq "FEDORA-2024-8a41ea93a2") {
assert_script_run 'sed -i -e "s,dnf,dnf5,g" config.xml';
assert_script_run 'sed -i -e "s,dnf-yum,yum,g" teams/cloud/container.xml';
assert_script_run 'sed -i -e "s,dnf-yum,yum,g" teams/cloud/vagrant.xml';
}
# now add the side repo or tag repo to the appropriate repo XML
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"advisory\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/update_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml unless ($tag);
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"openqa-testtag\" sourcetype=\"baseurl\">\n <source path=\"https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($tag);