-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a test for cost install and reinstall
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
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,27 @@ | ||
@dnf5 | ||
Feature: Repositories with cost | ||
|
||
|
||
Background: Use repository with cost 1000 | ||
Given I use repository "dnf-ci-priority-1" with configuration | ||
| key | value | | ||
| cost | 1000 | | ||
|
||
|
||
Scenario: Install and reinstall RPM from the lower-cost repository | ||
When I execute dnf with args "--nogpgcheck install flac --repofrompath=cost_900,{context.scenario.repos_location}/dnf-ci-priority-1 --setopt=cost_900.cost=900 --repofrompath=cost_1100,{context.scenario.repos_location}/dnf-ci-priority-1 --setopt=cost_1100.cost=1100" | ||
Then the exit code is 0 | ||
And Transaction is following | ||
| Action | Package | | ||
| install | flac-0:1.3.3-2.fc29.x86_64 | | ||
When I execute dnf with args "repoquery --installed flac --qf='%{{name}} %{{from_repo}}'" | ||
Then the exit code is 0 | ||
And stdout contains "flac cost_900" | ||
When I execute dnf with args "--nogpgcheck reinstall flac --repofrompath=cost_900,{context.scenario.repos_location}/dnf-ci-priority-1 --setopt=cost_900.cost=900 --repofrompath=cost_1100,{context.scenario.repos_location}/dnf-ci-priority-1 --setopt=cost_1100.cost=1100" | ||
Then the exit code is 0 | ||
And Transaction is following | ||
| Action | Package | | ||
| reinstall | flac-0:1.3.3-2.fc29.x86_64 | | ||
When I execute dnf with args "repoquery --installed flac --qf='%{{name}} %{{from_repo}}'" | ||
Then the exit code is 0 | ||
And stdout contains "flac cost_900" |