Skip to content

Commit

Permalink
Add test for --transient and persistence option
Browse files Browse the repository at this point in the history
The --transient flag only works on a bootc system, but we should test
that it throws the correct error and doesn't do anything unexpected on
non-bootc systems.

Requires rpm-software-management/dnf#2180 and
rpm-software-management/libdnf#1683.
  • Loading branch information
evan-goode committed Jan 15, 2025
1 parent 82c1acc commit 2ef92af
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions dnf-behave-tests/dnf/transient.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Feature: Persistence option and --transient


Scenario: Try installing a package using --transient on a non-bootc system
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install flac --transient"
Then the exit code is 1
And stderr is
"""
Transient transactions are only supported on bootc systems.
"""

Scenario: Try installing a package with persistence=transient on a non-bootc system
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install flac --setopt=persistence=transient"
Then the exit code is 1
And stderr is
"""
Transient transactions are only supported on bootc systems.
"""

Scenario: Install a package with persistence=auto on a non-bootc system
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install flac --setopt=persistence=auto"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | flac-0:1.3.2-8.fc29.x86_64 |

Scenario: Install a package with persistence=persist on a non-bootc system
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install flac --setopt=persistence=persist"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | flac-0:1.3.2-8.fc29.x86_64 |

0 comments on commit 2ef92af

Please sign in to comment.