mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-25 15:23:08 +00:00
2e5fa93415
Somehow, the dummy package being python3-kickstart causes the graphical update tests (only) to fail for pykickstart updates (that's the source package of python3-kickstart). The CLI and Cockpit update tests are fine with this and pass. To workaround this, use python3-blivet as the dummy package for the graphical update tests when testing an update that contains python3-kickstart. I've updated the test repo to contain both dummy packages. Signed-off-by: Adam Williamson <awilliam@redhat.com>
48 lines
1.8 KiB
Perl
48 lines
1.8 KiB
Perl
package packagetest;
|
|
|
|
use strict;
|
|
|
|
use base 'Exporter';
|
|
use Exporter;
|
|
|
|
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
|
|
sub prepare_test_packages {
|
|
my ($package) = @_;
|
|
$package //= "python3-kickstart";
|
|
# remove python3-kickstart if installed (we don't use assert
|
|
# here in case it's not)
|
|
script_run "dnf -y remove $package", 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";
|
|
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';
|
|
}
|
|
}
|
|
|
|
# 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";
|
|
}
|
|
|
|
# check updating the test packages and the fake python3-kickstart 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
|
|
# 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";
|
|
}
|