Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for repoquery -f, -l #1488

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions dnf-behave-tests/dnf/repoquery/files.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@dnf5
Feature: Repoquery tests working with files


Scenario: list files in an rpm including files in filelists.xml
Given I use repository "repoquery-files"
When I execute dnf with args "repoquery a.x86_64 -l"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
/root-file
/usr/bin/a-binary
"""


Scenario: filter by file in primary.xml
Given I use repository "repoquery-files"
When I execute dnf with args "repoquery --file /usr/bin/a-binary"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
a-0:1.0-1.fc29.x86_64
"""


@bz2276012
Scenario: filter by file in filelists.xml
Given I use repository "repoquery-files"
When I execute dnf with args "repoquery --file /root-file"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
a-0:1.0-1.fc29.x86_64
"""
21 changes: 21 additions & 0 deletions dnf-behave-tests/fixtures/specs/repoquery-files/a-1.0-1.fc29.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name: a
Version: 1.0
Release: 1.fc29
Summary: Made up package

License: GPLv3+
Url: None

%description
a description

%install
mkdir -p %{buildroot}%{_bindir}
touch %{buildroot}%{_bindir}/a-binary
touch %{buildroot}/root-file

%files
%{_bindir}/a-binary
/root-file

%changelog
Loading