mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 05:53:09 +00:00
5572a73f61
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>
42 lines
1.6 KiB
Perl
42 lines
1.6 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 pandoc-common and install the fake one
|
|
sub prepare_test_packages {
|
|
# remove pandoc-common if installed (we don't use assert
|
|
# here in case it's not)
|
|
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 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';
|
|
}
|
|
}
|
|
|
|
# check our test packages installed correctly (this is a test that dnf
|
|
# actually does what it claims)
|
|
sub verify_installed_packages {
|
|
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 pandoc-common work
|
|
# as expected
|
|
sub verify_updated_packages {
|
|
# 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 pandoc-common', sub { $_ !~ m/^pandoc-common-1-1.noarch$/ };
|
|
assert_script_run 'rpm -V pandoc-common';
|
|
}
|