Skip to content

Commit

Permalink
Enable tests for missing debug packages
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek committed Jul 2, 2024
1 parent 914025a commit 5c96975
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions dnf-behave-tests/dnf/plugins-core/debuginfo-install.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ Scenario: reports an error for a non-existent package
--skip-unavailable to skip unavailable packages
"""


@dnf5
Scenario: reports an error for a package without debuginfo
When I execute dnf with args "debuginfo-install nodebug"
Then the exit code is 0
And stdout is
And stderr is
"""
<REPOSYNC>
Could not find debuginfo package for the following available packages: nodebug-1.0-1
Could not find debugsource package for the following available packages: nodebug-1.0-1
Dependencies resolved.
Nothing to do.
Complete!
Could not find debuginfo package for the following packages resolved from the argument 'nodebug': nodebug-0:1.0-1.x86_64
Could not find debugsource package for the following packages resolved from the argument 'nodebug': nodebug-0:1.0-1.x86_64
"""

@dnf5
Expand Down Expand Up @@ -90,34 +86,26 @@ Scenario: installs debuginfo when a -debuginfo package is provided
| install | foo-debuginfo-0:2.0-1.x86_64 |
| install-weak | foo-debugsource-0:2.0-1.x86_64 |


@dnf5
@bz1586059 @bz1629412
Scenario: can't find the version of debuginfo for an installed package
Given I successfully execute dnf with args "install bar-2.0"
When I execute dnf with args "debuginfo-install bar"
Then the exit code is 0
And stdout is
And stderr is
"""
<REPOSYNC>
Could not find debuginfo package for the following installed packages: bar-2.0-1.x86_64
Could not find debugsource package for the following installed packages: bar-2.0-1.x86_64
Dependencies resolved.
Nothing to do.
Complete!
Could not find debuginfo package for the following packages resolved from the argument 'bar': bar-0:2.0-1.x86_64
Could not find debugsource package for the following packages resolved from the argument 'bar': bar-0:2.0-1.x86_64
"""


@dnf5
Scenario: can't find the requested version of debuginfo (multilib package, architectures can be mixed up)
When I execute dnf with args "debuginfo-install baz-1.0"
Then the exit code is 0
And stdout is
And stderr is
"""
<REPOSYNC>
Could not find debuginfo package for the following available packages: baz-1.0-1
Could not find debugsource package for the following available packages: baz-1.0-1
Dependencies resolved.
Nothing to do.
Complete!
Could not find debuginfo package for the following packages resolved from the argument 'baz-1.0': baz-0:1.0-1.i686, baz-0:1.0-1.x86_64
Could not find debugsource package for the following packages resolved from the argument 'baz-1.0': baz-0:1.0-1.i686, baz-0:1.0-1.x86_64
"""

@dnf5
Expand Down Expand Up @@ -152,15 +140,15 @@ Given I successfully execute dnf with args "install kernel-1.0 kernel-2.0"
| install | kernel-debuginfo-0:2.0-1.x86_64 |
| install | kernel-debugsource-0:2.0-1.x86_64 |


@dnf5
Scenario: multiple packages, a glob that doesn't find debuginfo for the installed version
Given I successfully execute dnf with args "install foo-1.0 bar-2.0"
When I execute dnf with args "debuginfo-install foo ba* nodebug"
Then the exit code is 0
And stdout contains "Could not find debuginfo package for the following installed packages: bar-2.0-1.x86_64"
And stdout contains "Could not find debugsource package for the following installed packages: bar-2.0-1.x86_64"
And stdout contains "Could not find debuginfo package for the following available packages: nodebug-1.0-1"
And stdout contains "Could not find debugsource package for the following available packages: nodebug-1.0-1"
And stderr contains "Could not find debuginfo package for the following packages resolved from the argument 'ba\*': bar-0:2\.0-1\.x86_64"
And stderr contains "Could not find debugsource package for the following packages resolved from the argument 'ba\*': bar-0:2\.0-1\.x86_64"
And stderr contains "Could not find debuginfo package for the following packages resolved from the argument 'nodebug': nodebug-0:1\.0-1\.x86_64"
And stderr contains "Could not find debugsource package for the following packages resolved from the argument 'nodebug': nodebug-0:1\.0-1\.x86_64"
And Transaction is following
| Action | Package |
| install | baz-debuginfo-0:2.0-1.x86_64 |
Expand Down Expand Up @@ -207,7 +195,7 @@ Given I successfully execute dnf with args "install bar-3.0"
| upgrade | bar-debuginfo-0:3.0-1.x86_64 |
| upgrade | bar-debugsource-0:3.0-1.x86_64 |


@dnf5
@bz1586084
Scenario: debuginfo is upgraded according to the installed version of the base package, debugsource is not found
Given I successfully execute dnf with args "install bar-1.0"
Expand All @@ -219,7 +207,7 @@ Given I successfully execute dnf with args "debuginfo-install bar"
Given I successfully execute dnf with args "install bar-4.0"
When I execute dnf with args "debuginfo-install bar"
Then the exit code is 0
And stdout contains "Could not find debugsource package for the following installed packages: bar-4.0-1.x86_64"
And stderr contains "Could not find debugsource package for the following packages resolved from the argument 'bar': bar-0:4.0-1.x86_64"
And Transaction is following
| Action | Package |
| upgrade | bar-debuginfo-0:4.0-1.x86_64 |
Expand Down

0 comments on commit 5c96975

Please sign in to comment.