Skip to content

Commit

Permalink
Adjust append_options.feature for dnf5 and enable them
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha authored and pkratoch committed Mar 25, 2024
1 parent 82b53bd commit 2c61e63
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions dnf-behave-tests/dnf/append_options.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,76 @@ Background: Enable repository and set excludes in configuration
| exclude | lame, lz4 |


@dnf5
Scenario: Test that excludes from config file are applied
When I execute dnf with args "repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
wget-0:1.19.6-5.fc29.src
wget-0:1.19.6-5.fc29.x86_64
"""


@dnf5
Scenario: Test adding of excludes
When I execute dnf with args "--exclude=lz4 --exclude=wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


@dnf5
Scenario: Test adding of excludes using --setopt
When I execute dnf with args "--setopt=excludepkgs=lz4 --setopt=excludepkgs=wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


@dnf5
Scenario: Test adding of excludes short notation
When I execute dnf with args "--exclude=lz4,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


@dnf5
Scenario: Test adding of excludes short notation using --setopt
When I execute dnf with args "--setopt=excludepkgs=lz4,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


# dnf5 does not correctly reset config file options from command line
# https://github.com/rpm-software-management/dnf5/issues/1331
Scenario: Test removing of existing excludes
When I execute dnf with args "--exclude= repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
lame-0:3.100-5.fc29.src
Expand All @@ -79,11 +92,14 @@ Scenario: Test removing of existing excludes
"""


# dnf5 does not correctly reset config file options from command line
# https://github.com/rpm-software-management/dnf5/issues/1331
Scenario: Test removing of existing excludes using --setopt
When I execute dnf with args "--setopt=excludepkgs= repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
lame-0:3.100-5.fc29.src
Expand All @@ -96,93 +112,113 @@ Scenario: Test removing of existing excludes using --setopt
"""


# dnf5 does not correctly reset config file options from command line
# https://github.com/rpm-software-management/dnf5/issues/1331
Scenario: Test replacing of existing excludes
When I execute dnf with args "--exclude= --exclude=lz4 --exclude=wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
lame-0:3.100-5.fc29.src
lame-0:3.100-5.fc29.x86_64
"""


# dnf5 does not correctly reset config file options from command line
# https://github.com/rpm-software-management/dnf5/issues/1331
Scenario: Test replacing of existing excludes using --setopt
When I execute dnf with args "--setopt=excludepkgs= --setopt=excludepkgs=lz4 --setopt=excludepkgs=wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
lame-0:3.100-5.fc29.src
lame-0:3.100-5.fc29.x86_64
"""


# dnf5 does not correctly reset config file options from command line
# https://github.com/rpm-software-management/dnf5/issues/1331
Scenario: Test replacing of existing excludes short notation
When I execute dnf with args "--exclude=,lz4,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
lame-0:3.100-5.fc29.src
lame-0:3.100-5.fc29.x86_64
"""


# dnf5 does not correctly reset config file options from command line
# https://github.com/rpm-software-management/dnf5/issues/1331
Scenario: Test replacing of existing excludes short notation using --setopt
When I execute dnf with args "--setopt=excludepkgs=,lz4,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
lame-0:3.100-5.fc29.src
lame-0:3.100-5.fc29.x86_64
"""


@dnf5
@bz1788154
Scenario: Test adding excludes (empty values in the middle of short notation are ignored)
When I execute dnf with args "--exclude=lz4,,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


@dnf5
@bz1788154
Scenario: Test adding excludes (empty values in the middle of short notation are ignored) using --setopt
When I execute dnf with args "--setopt=excludepkgs=lz4,,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


@dnf5
@bz1788154
Scenario: Test adding excludes (empty value at the end of short notation is ignored)
When I execute dnf with args "--exclude=lz4,wget, repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""


@dnf5
@bz1788154
Scenario: Test adding excludes (empty value at the end of short notation is ignored) using --setopt
When I execute dnf with args "--setopt=excludepkgs=lz4,wget, repoquery abcde lame lz4 wget"
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
abcde-0:2.9.3-1.fc29.noarch
abcde-0:2.9.3-1.fc29.src
"""

0 comments on commit 2c61e63

Please sign in to comment.