forked from rpm-software-management/ci-dnf-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for history rollback between states with the same version o…
…f a package installed - dnf5 history list doesn't fill in actions: https://github.com/rpm-software-management/dnf5/iss - There is a change in one `Altered` count because dnf4 doesn't count/list `Upgraded` and `Downgraded` actions. dnf5 on the other hand shows the `Replaced` action which is their equivalent.
- Loading branch information
1 parent
8b19282
commit 7e3e2ca
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
dnf-behave-tests/dnf/history-rollback-same-package.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@dnf5 | ||
Feature: Transaction history rollback between states with the same version of a package installed | ||
|
||
|
||
Background: | ||
Given I use repository "dnf-ci-fedora" | ||
And I successfully execute dnf with args "install flac" | ||
|
||
|
||
# https://github.com/rpm-software-management/dnf/issues/2031 | ||
@GH-2031 | ||
Scenario: Rollback removal and installation of the same package | ||
Given I successfully execute dnf with args "remove flac" | ||
And I successfully execute dnf with args "install flac" | ||
And I successfully execute dnf with args "history list" | ||
Then stdout is history list | ||
| Id | Command | Action | Altered | | ||
| 3 | | | 1 | | ||
| 2 | | | 1 | | ||
| 1 | | | 1 | | ||
Given I successfully execute dnf with args "history rollback 1" | ||
Then Transaction is empty | ||
|
||
|
||
# https://issues.redhat.com/browse/RHEL-17494 | ||
@RHEL-17494 | ||
Scenario: Two rollbacks of the package upgrade | ||
Given I use repository "dnf-ci-fedora-updates" | ||
And I successfully execute dnf with args "upgrade flac" | ||
And I successfully execute dnf with args "history list" | ||
Then stdout is history list | ||
| Id | Command | Action | Altered | | ||
| 2 | | | 2 | | ||
| 1 | | | 1 | | ||
Given I successfully execute dnf with args "history rollback 1" | ||
Then Transaction is following | ||
| Action | Package | | ||
| downgrade | flac-1.3.2-8.fc29.x86_64 | | ||
Given I successfully execute dnf with args "history rollback 1" | ||
Then Transaction is empty |