Skip to content

Commit

Permalink
config.feature: Enable passing tests for dnf5
Browse files Browse the repository at this point in the history
Some adjustments were needed due to different messages in dnf4/dnf5.
There still is one failing scenario - I added a comment with a link to
the dnf5 issue.
  • Loading branch information
m-blaha authored and kontura committed Oct 10, 2024
1 parent 20185ea commit 7282ce3
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions dnf-behave-tests/dnf/config.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Scenario: Test with dnf.conf in installroot and --config (dnf.conf is taken from
"""


@dnf5
Scenario: Reposdir option in dnf.conf file in installroot
Given I configure dnf with
| key | value |
Expand All @@ -76,6 +77,7 @@ Scenario: Reposdir option in dnf.conf file in installroot
| install-dep | setup-0:2.12.1-1.fc29.noarch |


@dnf5
Scenario: Reposdir option in dnf.conf file with --config option in installroot
Given I create file "/test/dnf.conf" with
"""
Expand All @@ -94,6 +96,7 @@ Scenario: Reposdir option in dnf.conf file with --config option in installroot
| install-dep | setup-0:2.12.1-1.fc29.noarch |


@dnf5
Scenario: Reposdir option set by --setopt
Given I configure a new repository "testrepo" in "{context.dnf.installroot}/testrepos" with
| key | value |
Expand Down Expand Up @@ -151,6 +154,8 @@ Scenario: Lines that contain only whitespaces do not spoil previous config optio
"""


# dnf5 does not support remote config files
# https://github.com/rpm-software-management/dnf5/issues/1767
@bz1721091
Scenario: Dnf can use config file from remote location
Given I create directory "/remotedir"
Expand Down Expand Up @@ -188,6 +193,7 @@ Scenario: Dnf prints reasonable error when remote config file is not downloadabl
And stderr contains "Configuration file.*not found"


@dnf5
@no_installroot
Scenario: Create dnf.conf file and test if host is using /etc/dnf/dnf.conf
Given I use repository "simple-base"
Expand All @@ -198,17 +204,15 @@ Scenario: Create dnf.conf file and test if host is using /etc/dnf/dnf.conf
"""
When I execute dnf with args "install vagare"
Then the exit code is 1
And stdout is
"""
All matches were filtered out by exclude filtering for argument: vagare
"""
And stderr is
"""
<REPOSYNC>
Error: Unable to find a match: vagare
Failed to resolve the transaction:
Argument 'vagare' matches only excluded packages.
"""


@dnf5
@no_installroot
Scenario: Create dnf.conf file and test if host is taking option --config /test/dnf.conf file
Given I use repository "simple-base"
Expand All @@ -230,14 +234,11 @@ Scenario: Create dnf.conf file and test if host is taking option --config /test/
| install-dep | labirinto-1.0-1.fc29.x86_64 |
When I execute dnf with args "--config /test/dnf.conf install dedalo-signed"
Then the exit code is 1
And stdout is
"""
All matches were filtered out by exclude filtering for argument: dedalo-signed
"""
And stderr is
"""
<REPOSYNC>
Error: Unable to find a match: dedalo-signed
Failed to resolve the transaction:
Argument 'dedalo-signed' matches only excluded packages.
"""


Expand Down Expand Up @@ -285,6 +286,7 @@ Scenario: dnf.conf is taken from host if --use-host-config is used
"""


@dnf5
@no_installroot
Scenario: Reposdir option in dnf.conf file in host
Given I configure dnf with
Expand Down

0 comments on commit 7282ce3

Please sign in to comment.