Skip to content

Commit

Permalink
Add test for remove command to ensure not removing according to provides
Browse files Browse the repository at this point in the history
The new behavior is more stable for cases when the same spec is used multiple
times with remove command.
  • Loading branch information
j-mracek committed Jan 4, 2024
1 parent 4360d2a commit 9108be6
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 60 deletions.
27 changes: 27 additions & 0 deletions dnf-behave-tests/dnf/remove-no-provides.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@dnf5daemon
Feature: Remove RPMs by provides


Background: Install glibc
Given I use repository "dnf-ci-provides-alternatives"
When I execute dnf with args "install foo bar"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | foo-0:1.0.0-0.fc29.noarch |
| install | bar-0:1.0-1.noarch |



@dnf5
Scenario: Remove an RPM by name and nott by provide
When I execute dnf with args "remove 'foo'"
Then the exit code is 0
And Transaction is following
| Action | Package |
| remove | foo-0:1.0.0-0.fc29.noarch |
When I execute dnf with args "remove 'foo'"
Then the exit code is 0
And Transaction is empty


60 changes: 0 additions & 60 deletions dnf-behave-tests/dnf/remove-provides.feature

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%undefine _debuginfo_subpackages

Name: bar
Version: 1.0
Release: 1

License: Public Domain
URL: None

Provides: foo

Summary: Package bar provides foo

BuildArch: noarch

%description
Dummy.

%files



%changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Name: foo
Version: 1.0.0
Release: 0%{?dist}
Summary: A utility that provides a binary named bar

BuildArch: noarch

License: GPLv3+

%description
Package foo


%install


%files


%changelog

0 comments on commit 9108be6

Please sign in to comment.