1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-01 17:53:08 +00:00
os-autoinst-distri-fedora/tests/dnf5/search.pm
2023-07-18 10:49:06 +02:00

30 lines
772 B
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
use dnf;
# This script will make sure that DNF5 is able to
# search repositories and get package info.
# https://fedoraproject.org/wiki/QA:Testcase_DNF_search
sub run {
my $self = shift;
# We will search for the existing package, python3-tkinter
# might be a safe option as python is always ready on Fedora.
#
assert_script_run("dnf5 search python3-tkinter | grep tkinter", timeout => 60);
# The third check checks that "No matches found" string is shown
# when we attempt to look for a non-existing package.
assert_script_run("dnf5 search jezibaba | grep 'No matches found'", timeout => 60);
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: