Skip to content

Commit

Permalink
Enable append options tests for dnf5
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha committed May 16, 2024
1 parent 9b023cc commit c965f41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
22 changes: 1 addition & 21 deletions dnf-behave-tests/dnf/append_options.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@dnf5
Feature: DNF test of append option

# The excludepks append option was choosen for testing.
Expand All @@ -10,7 +11,6 @@ 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
Expand All @@ -24,7 +24,6 @@ Scenario: Test that excludes from config file are applied
"""


@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
Expand All @@ -36,7 +35,6 @@ Scenario: Test adding of excludes
"""


@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
Expand All @@ -48,7 +46,6 @@ Scenario: Test adding of excludes using --setopt
"""


@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
Expand All @@ -60,7 +57,6 @@ Scenario: Test adding of excludes short notation
"""


@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
Expand All @@ -72,8 +68,6 @@ Scenario: Test adding of excludes short notation using --setopt
"""


# 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
Expand All @@ -92,8 +86,6 @@ 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
Expand All @@ -112,8 +104,6 @@ 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
Expand All @@ -127,8 +117,6 @@ Scenario: Test replacing 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 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
Expand All @@ -142,8 +130,6 @@ Scenario: Test replacing 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 short notation
When I execute dnf with args "--exclude=,lz4,wget repoquery abcde lame lz4 wget"
Then the exit code is 0
Expand All @@ -157,8 +143,6 @@ Scenario: Test replacing of existing excludes short notation
"""


# 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
Expand All @@ -172,7 +156,6 @@ Scenario: Test replacing of existing excludes short notation using --setopt
"""


@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"
Expand All @@ -185,7 +168,6 @@ Scenario: Test adding excludes (empty values in the middle of short notation are
"""


@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"
Expand All @@ -198,7 +180,6 @@ Scenario: Test adding excludes (empty values in the middle of short notation are
"""


@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"
Expand All @@ -211,7 +192,6 @@ Scenario: Test adding excludes (empty value at the end of short notation is igno
"""


@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"
Expand Down
4 changes: 4 additions & 0 deletions dnf-behave-tests/dnf/setopt.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@dnf5
Feature: --setopt option


Expand All @@ -15,6 +16,7 @@ Scenario: Without --setopt option, packages wget and flac are available
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
flac-0:1.0-1.fc29.src
flac-0:1.0-1.fc29.x86_64
flac-libs-0:1.0-1.fc29.x86_64
Expand All @@ -28,6 +30,7 @@ Scenario: --setopt option can be used to set config for specific repo (and repo
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
wget-0:1.0-1.fc29.src
wget-0:1.0-1.fc29.x86_64
"""
Expand All @@ -38,6 +41,7 @@ Scenario: --setopt option can be used with globs to set config for multiple repo
Then the exit code is 0
And stdout is
"""
<REPOSYNC>
flac-0:1.0-1.fc29.src
flac-0:1.0-1.fc29.x86_64
flac-libs-0:1.0-1.fc29.x86_64
Expand Down

0 comments on commit c965f41

Please sign in to comment.