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.

Requires: rpm-software-management/dnf5#1126
  • Loading branch information
j-mracek authored and ppisar committed Jan 8, 2024
1 parent 340407e commit e4bec00
Show file tree
Hide file tree
Showing 4 changed files with 65 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 two providers of foo - foo and bar
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-1.noarch |
| install | bar-0:1.0-1.noarch |



@dnf5
Scenario: Remove an RPM by name and not 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-1.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,19 @@
Name: bar
Version: 1.0
Release: 1

Provides: foo

Summary: Package bar that provides foo
License: GPLv2+ and Public Domain

BuildArch: noarch

%description
Dummy.


%files


%changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Name: foo
Version: 1.0
Release: 1

Summary: A dummy package foo
License: GPLv2+ and Public Domain

BuildArch: noarch



%description
Dummy.


%files


%changelog

0 comments on commit e4bec00

Please sign in to comment.