From a9b8560ba40fc2b71cda04d2e93c368c417a1f7f Mon Sep 17 00:00:00 2001 From: Marek Blaha Date: Wed, 24 Apr 2024 17:51:07 +0200 Subject: [PATCH] Enable tests with skipped packages in transaction table --- dnf-behave-tests/dnf/autoremove.feature | 2 +- .../dnf/broken-dependencies-report.feature | 24 +++++++------------ .../dnf/install-dependencies.feature | 7 +++--- dnf-behave-tests/dnf/upgrade.feature | 3 +++ 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/dnf-behave-tests/dnf/autoremove.feature b/dnf-behave-tests/dnf/autoremove.feature index b01659dda..9a75aacf7 100644 --- a/dnf-behave-tests/dnf/autoremove.feature +++ b/dnf-behave-tests/dnf/autoremove.feature @@ -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 diff --git a/dnf-behave-tests/dnf/broken-dependencies-report.feature b/dnf-behave-tests/dnf/broken-dependencies-report.feature index 8bb8fa253..036726c68 100644 --- a/dnf-behave-tests/dnf/broken-dependencies-report.feature +++ b/dnf-behave-tests/dnf/broken-dependencies-report.feature @@ -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 - """ - - Nothing to do. - """ + And Transaction is following + | Action | Package | + | broken | postgresql-9.6.5-1.fc29.x86_64 | @bz2088422 @@ -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 - """ - - Nothing to do. - """ + And Transaction is following + | Action | Package | + | broken | postgresql-9.6.5-1.fc29.x86_64 | @bz2088422 @@ -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 - """ - - Nothing to do. - """ + And Transaction is following + | Action | Package | + | broken | postgresql-9.6.5-1.fc29.x86_64 | diff --git a/dnf-behave-tests/dnf/install-dependencies.feature b/dnf-behave-tests/dnf/install-dependencies.feature index f8e4d0ae6..943dac590 100644 --- a/dnf-behave-tests/dnf/install-dependencies.feature +++ b/dnf-behave-tests/dnf/install-dependencies.feature @@ -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" diff --git a/dnf-behave-tests/dnf/upgrade.feature b/dnf-behave-tests/dnf/upgrade.feature index 30641cda2..39be114a5 100644 --- a/dnf-behave-tests/dnf/upgrade.feature +++ b/dnf-behave-tests/dnf/upgrade.feature @@ -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 @@ -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 @@ -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