Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for offline transaction with local rpms #1529

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions dnf-behave-tests/dnf/offline.feature
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,36 @@ Given I successfully execute dnf with args "offline-upgrade reboot"
And Transaction is following
| Action | Package |
| upgrade | labirinto-2.0-1.fc29.x86_64 |


Scenario: Test offline install with local rpm (absolute path)
Given I use repository "simple-base"
And I copy file "{context.dnf.fixturesdir}/repos/simple-base/x86_64/labirinto-1.0-1.fc29.x86_64.rpm" to "/tmp/labirinto-1.0-1.fc29.x86_64.rpm"
When I execute dnf with args "install --offline {context.dnf.installroot}/tmp/labirinto-1.0-1.fc29.x86_64.rpm"
Then the exit code is 0
And DNF Transaction is following
| Action | Package |
| install | labirinto-0:1.0-1.fc29.x86_64 |
When I execute dnf with args "offline reboot"
And I execute dnf with args "offline _execute"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | labirinto-0:1.0-1.fc29.x86_64 |


Scenario: Test offline install with local rpm (relative path)
Given I use repository "simple-base"
And I copy file "{context.dnf.fixturesdir}/repos/simple-base/x86_64/labirinto-1.0-1.fc29.x86_64.rpm" to "/tmp/labirinto-1.0-1.fc29.x86_64.rpm"
And I set working directory to "{context.dnf.installroot}/tmp/"
When I execute dnf with args "install --offline ./labirinto-1.0-1.fc29.x86_64.rpm"
Then the exit code is 0
And DNF Transaction is following
| Action | Package |
| install | labirinto-0:1.0-1.fc29.x86_64 |
When I execute dnf with args "offline reboot"
And I execute dnf with args "offline _execute"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | labirinto-0:1.0-1.fc29.x86_64 |
Loading