Skip to content

Commit

Permalink
Enable tests with skipped packages in transaction table
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha authored and kontura committed May 10, 2024
1 parent 111a220 commit a9b8560
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dnf-behave-tests/dnf/autoremove.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Scenario: Autoremoval of package which became non-required by others
And Transaction is following
| Action | Package |
| upgrade | SuperRipper-0:1.2-1.x86_64 |
#| broken | SuperRipper-0:1.3-1.x86_64 | # TODO(mblaha) broken packages are not captured in dnf5 transaction
| broken | SuperRipper-0:1.3-1.x86_64 |
When I execute dnf with args "autoremove"
Then the exit code is 0
And Transaction is following
Expand Down
24 changes: 9 additions & 15 deletions dnf-behave-tests/dnf/broken-dependencies-report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ Scenario: Broken dependencies are reported when strict and best options are off
- conflicting requests
- package postgresql-libs-9.6.5-1.fc29.x86_64 is filtered out by exclude filtering
"""
And stdout is
"""
<REPOSYNC>
Nothing to do.
"""
And Transaction is following
| Action | Package |
| broken | postgresql-9.6.5-1.fc29.x86_64 |


@bz2088422
Expand All @@ -40,11 +38,9 @@ Scenario: Broken dependencies are reported when strict option is off and best op
- conflicting requests
- package postgresql-libs-9.6.5-1.fc29.x86_64 is filtered out by exclude filtering
"""
And stdout is
"""
<REPOSYNC>
Nothing to do.
"""
And Transaction is following
| Action | Package |
| broken | postgresql-9.6.5-1.fc29.x86_64 |


@bz2088422
Expand All @@ -59,8 +55,6 @@ Scenario: Broken dependencies are reported when skip-broken and best options are
- conflicting requests
- package postgresql-libs-9.6.5-1.fc29.x86_64 is filtered out by exclude filtering
"""
And stdout is
"""
<REPOSYNC>
Nothing to do.
"""
And Transaction is following
| Action | Package |
| broken | postgresql-9.6.5-1.fc29.x86_64 |
7 changes: 3 additions & 4 deletions dnf-behave-tests/dnf/install-dependencies.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ Feature: Tests for install with dependencies
@bz1774617
Scenario: Best candidates have conflicting dependencies
Given I use repository "install-dependencies"
When I execute dnf with args "install foo bar --nobest"
When I execute dnf with args "install foo bar --no-best"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | foo-0:1.0-1.fc29.x86_64 |
| install | bar-0:1.0-1.fc29.x86_64 |
| install-dep | lib-0:1.0-1.fc29.x86_64 |
# dnf5 currently does not report packages skipped due to conflict / broken deps
# | conflict | lib-0:2.0-1.fc29.x86_64 |
# | broken | foo-0:2.0-1.fc29.x86_64 |
| conflict | lib-0:2.0-1.fc29.x86_64 |
| broken | foo-0:2.0-1.fc29.x86_64 |
And stderr contains "cannot install both lib-.\.0-1\.fc29\.x86_64 and lib-.\.0-1\.fc29\.x86_64"
And stderr contains "package foo-2.0-1.fc29.x86_64 requires lib-2.0, but none of the providers can be installed"
And stderr contains "package bar-1.0-1.fc29.x86_64 requires lib-1.0, but none of the providers can be installed"
Expand Down
3 changes: 3 additions & 0 deletions dnf-behave-tests/dnf/upgrade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Scenario: Upgrade all RPMs from multiple repositories with best=False
| upgrade | wget-1:1.19.5-5.fc29.x86_64 |
| upgrade | SuperRipper-0:1.2-1.x86_64 |
| upgrade | abcde-0:2.9.3-1.fc29.noarch |
| broken | SuperRipper-1.3-1.x86_64 |


@dnf5
Expand Down Expand Up @@ -180,6 +181,7 @@ Scenario: Upgrade all RPMs from multiple repositories with best=True
| upgrade | wget-1:1.19.5-5.fc29.x86_64 |
| upgrade | SuperRipper-0:1.2-1.x86_64 |
| upgrade | abcde-0:2.9.3-1.fc29.noarch |
| broken | SuperRipper-1.3-1.x86_64 |
And stderr is
"""
Problem: cannot install the best update candidate for package SuperRipper-1.0-1.x86_64
Expand All @@ -198,6 +200,7 @@ Scenario: Print information about skipped packages
And Transaction is following
| Action | Package |
| upgrade | SuperRipper-0:1.2-1.x86_64 |
| broken | SuperRipper-1.3-1.x86_64 |
Then stderr is
"""
Problem: cannot install the best update candidate for package SuperRipper-1.0-1.x86_64
Expand Down

0 comments on commit a9b8560

Please sign in to comment.