1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-02-20 06:14:32 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Adam Williamson
5572a73f61 Use pandoc-common instead of python3-kickstart for package tests
Reasoning:

1. pandoc is not in critpath so will not itself be tested
2. pandoc is widely used and actively maintained
3. package is noarch
4. package has minimal deps

Hopefully this will work for everything. For some reason, the
"use python3-blivet for pykickstart tests" fails mysteriously
sometimes, see e.g.
https://openqa.stg.fedoraproject.org/tests/2672282

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-03-18 09:44:02 -07:00
Adam Williamson
38c3693684 Revert "Fix desktop_update_graphical tests for pykickstart updates"
This reverts commit 2e5fa93415.
Let's try using one non-critpath package for all these tests
instead.
2023-03-18 09:39:19 -07:00
Adam Williamson
bac28124a0 _ostree_build: use koji-rawhide.repo in lorax command
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-03-18 08:37:01 -07:00
4 changed files with 21 additions and 30 deletions

View File

@ -9,17 +9,15 @@ use testapi;
our @EXPORT = qw/prepare_test_packages verify_installed_packages verify_updated_packages/;
# enable the openqa test package repositories and install the main
# test packages, remove test package and install the fake one
# test packages, remove pandoc-common and install the fake one
sub prepare_test_packages {
my ($package) = @_;
$package //= "python3-kickstart";
# remove python3-kickstart if installed (we don't use assert
# remove pandoc-common if installed (we don't use assert
# here in case it's not)
script_run "dnf -y remove $package", 180;
script_run 'dnf -y remove pandoc-common', 180;
# grab the test repo definitions
assert_script_run 'curl -o /etc/yum.repos.d/openqa-testrepo-1.repo https://fedorapeople.org/groups/qa/openqa-repos/openqa-testrepo-1.repo';
# install the test packages from repo1
assert_script_run "dnf -y --disablerepo=* --enablerepo=openqa-testrepo-1 install $package";
assert_script_run 'dnf -y --disablerepo=* --enablerepo=openqa-testrepo-1 install pandoc-common';
if (get_var("DESKTOP") eq 'kde' && get_var("TEST") eq 'desktop_update_graphical') {
# kick pkcon so our special update will definitely get installed
assert_script_run 'pkcon refresh force';
@ -29,19 +27,15 @@ sub prepare_test_packages {
# check our test packages installed correctly (this is a test that dnf
# actually does what it claims)
sub verify_installed_packages {
my ($package) = @_;
$package //= "python3-kickstart";
validate_script_output "rpm -q $package", sub { $_ =~ m/^$package-1.1.noarch$/ };
assert_script_run "rpm -V $package";
validate_script_output 'rpm -q pandoc-common', sub { $_ =~ m/^pandoc-common-1.1.noarch$/ };
assert_script_run 'rpm -V pandoc-common';
}
# check updating the test packages and the fake python3-kickstart work
# check updating the test packages and the fake pandoc-common work
# as expected
sub verify_updated_packages {
my ($package) = @_;
$package //= "python3-kickstart";
# we don't know what version of the test package we'll actually
# we don't know what version of pandoc-common we'll actually
# get, so just check it's *not* the fake one
validate_script_output "rpm -q $package", sub { $_ !~ m/^$package-1-1.noarch$/ };
assert_script_run "rpm -V $package";
validate_script_output 'rpm -q pandoc-common', sub { $_ !~ m/^pandoc-common-1-1.noarch$/ };
assert_script_run 'rpm -V pandoc-common';
}

View File

@ -88,7 +88,9 @@ sub run {
unless ($version > $currrel) {
$cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo";
}
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo --repo=/etc/yum.repos.d/workarounds.repo ./results";
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo --repo=/etc/yum.repos.d/workarounds.repo";
$cmd .= " --repo=/etc/yum.repos.d/koji-rawhide.repo" if ($version eq $rawrel);
$cmd .= " ./results";
assert_script_run $cmd, 7000;
# good to have the log around for checks
upload_logs "lorax.log", failok => 1;

View File

@ -11,16 +11,16 @@ sub run {
prepare_test_packages;
# check rpm agrees they installed good
verify_installed_packages;
# update the fake python3-kickstart (should come from the real repo)
# update the fake pandoc-common (should come from the real repo)
# this can take a long time if we get unlucky with the metadata refresh
assert_script_run 'dnf -y --disablerepo=openqa-testrepo* --disablerepo=updates-testing update python3-kickstart', 600;
assert_script_run 'dnf -y --disablerepo=openqa-testrepo* --disablerepo=updates-testing update pandoc-common', 600;
# check we got the updated version
verify_updated_packages;
# now remove python3-kickstart, and see if we can do a straight
# now remove pandoc-common, and see if we can do a straight
# install from the default repos
assert_script_run 'dnf -y remove python3-kickstart';
assert_script_run 'dnf -y --disablerepo=openqa-testrepo* --disablerepo=updates-testing install python3-kickstart', 120;
assert_script_run 'rpm -V python3-kickstart';
assert_script_run 'dnf -y remove pandoc-common';
assert_script_run 'dnf -y --disablerepo=openqa-testrepo* --disablerepo=updates-testing install pandoc-common', 120;
assert_script_run 'rpm -V pandoc-common';
}
sub test_flags {

View File

@ -17,12 +17,7 @@ sub run {
if (get_var("ADVISORY_OR_TASK") && get_var("VERSION") eq get_var("RAWREL")) {
assert_script_run 'dnf config-manager --set-disabled koji-rawhide';
}
# for tests of pykickstart updates, we need to use a different dummy
my $package = "python3-kickstart";
if (get_var("ADVISORY_OR_TASK")) {
$package = "python3-blivet" unless (script_run "grep python3-kickstart /mnt/updatepkgs.txt");
}
prepare_test_packages $package;
prepare_test_packages;
# get back to the desktop
desktop_vt;
@ -140,7 +135,7 @@ sub run {
}
# back to console to verify updates
$self->root_console(tty => 3);
verify_updated_packages $package;
verify_updated_packages;
}
sub test_flags {