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

rhel-9.5.0: Create a test for cost install and reinstall #1493

Merged
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
27 changes: 27 additions & 0 deletions dnf-behave-tests/dnf/repo-cost.feature
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"
Loading