Skip to content

Commit

Permalink
Enable install-obsoletes tests for dnf5
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha committed Nov 24, 2023
1 parent de08615 commit cb9009a
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions dnf-behave-tests/dnf/install-obsoletes.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@dnf5
Feature: Install an obsoleted RPM


@dnf5
Scenario: Install an obsoleted RPM
Given I use repository "dnf-ci-thirdparty"
When I execute dnf with args "install glibc-profile"
Expand All @@ -17,7 +17,6 @@ Scenario: Install an obsoleted RPM
| Install | glibc-profile-0:2.3.1-10.x86_64 | User | dnf-ci-thirdparty |


@dnf5
Scenario: Install an obsoleted RPM when the obsoleting RPM is available
Given I use repository "dnf-ci-fedora"
And I use repository "dnf-ci-thirdparty"
Expand Down Expand Up @@ -88,8 +87,6 @@ Scenario: Upgrading obsoleted package by its obsoleter keeps userinstalled=false
"""


# @dnf5
# TODO(nsella) Unknown argument "mark" for command "microdnf"
@bz1672618
Scenario: Upgrading obsoleted package by its obsoleter keeps userinstalled=false (with --nobest)
Given I use repository "dnf-ci-thirdparty"
Expand All @@ -98,15 +95,11 @@ Scenario: Upgrading obsoleted package by its obsoleter keeps userinstalled=false
And Transaction is following
| Action | Package |
| install | glibc-profile-0:2.3.1-10.x86_64 |
When I execute dnf with args "mark remove glibc-profile"
When I execute dnf with args "mark dependency glibc-profile"
Then the exit code is 0
When I execute dnf with args "repoquery --userinstalled"
Then the exit code is 0
When I execute dnf with args "history userinstalled"
Then the exit code is 1
And stdout is empty
And stderr is
"""
Error: No packages to list
"""
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "upgrade --nobest"
Then the exit code is 0
Expand All @@ -119,32 +112,22 @@ Scenario: Upgrading obsoleted package by its obsoleter keeps userinstalled=false
| install-dep | glibc-common-0:2.28-9.fc29.x86_64 |
| install-dep | glibc-all-langpacks-0:2.28-9.fc29.x86_64 |
| obsoleted | glibc-profile-0:2.3.1-10.x86_64 |
When I execute dnf with args "history userinstalled"
Then the exit code is 1
When I execute dnf with args "repoquery --userinstalled"
Then the exit code is 0
And stdout is empty
And stderr is
"""
Error: No packages to list
"""

# @dnf5
# TODO(nsella) Unknown argument "mark" for command "microdnf"
Scenario: Install obsoleting package and inherit the best reason - user
Given I use repository "dnf-ci-thirdparty"
When I execute dnf with args "install glibc-profile"
Then the exit code is 0
And Transaction is following
| Action | Package |
| install | glibc-profile-0:2.3.1-10.x86_64 |
When I execute dnf with args "mark remove glibc-profile"
When I execute dnf with args "mark dependency glibc-profile"
Then the exit code is 0
When I execute dnf with args "repoquery --userinstalled"
Then the exit code is 0
When I execute dnf with args "history userinstalled"
Then the exit code is 1
And stdout is empty
And stderr is
"""
Error: No packages to list
"""
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install glibc-0:2.28-9.fc29.x86_64"
Then the exit code is 0
Expand All @@ -157,10 +140,9 @@ Scenario: Install obsoleting package and inherit the best reason - user
| install-dep | glibc-common-0:2.28-9.fc29.x86_64 |
| install-dep | glibc-all-langpacks-0:2.28-9.fc29.x86_64 |
| obsoleted | glibc-profile-0:2.3.1-10.x86_64 |
When I execute dnf with args "history userinstalled"
When I execute dnf with args "repoquery --userinstalled"
Then the exit code is 0
And stdout is
"""
Packages installed by user
glibc-2.28-9.fc29.x86_64
glibc-0:2.28-9.fc29.x86_64
"""

0 comments on commit cb9009a

Please sign in to comment.