Skip to content

Commit

Permalink
Add tests for history rollback between states with the same version o…
Browse files Browse the repository at this point in the history
…f a package installed
  • Loading branch information
jan-kolarik authored and j-mracek committed Mar 12, 2024
1 parent 7886af4 commit a7a2c93
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions dnf-behave-tests/dnf/history-rollback-same-package.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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 | | Install | 1 |
| 2 | | Removed | 1 |
| 1 | | Install | 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 | | Upgrade | 1 |
| 1 | | Install | 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

0 comments on commit a7a2c93

Please sign in to comment.