Skip to content

Commit

Permalink
Simplify dnf5 tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pkratoch committed Nov 1, 2024
1 parent c374112 commit b3c0059
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 60 deletions.
26 changes: 3 additions & 23 deletions dnf-behave-tests/dnf/list.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@dnf5
Feature: Test for dnf list (including all documented suboptions and yum compatibility)


Background: Enable dnf-ci-fedora repository
Given I use repository "dnf-ci-fedora"


@dnf5
Scenario: dnf list nonexistentpkg
When I execute dnf with args "list non-existent-pkg"
Then the exit code is 1
Expand All @@ -16,7 +16,6 @@ Scenario: dnf list nonexistentpkg
"""


@dnf5
Scenario: List all packages available
When I execute dnf with args "list"
Then the exit code is 0
Expand All @@ -27,7 +26,6 @@ Scenario: List all packages available
Then stdout section "Available packages" contains "glibc-all-langpacks.x86_64\s+2.28-9.fc29\s+dnf-ci-fedora"


@dnf5
Scenario: dnf list --extras (installed pkgs, not from known repos)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -45,7 +43,6 @@ Given I drop repository "dnf-ci-fedora"
"""


@dnf5
Scenario: dnf list setup (when setup is installed)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -61,7 +58,7 @@ Given I drop repository "dnf-ci-fedora"
setup.noarch +2.12.1-1.fc29 +dnf-ci-fedora
"""

@dnf5

Scenario: dnf list is case insensitive
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -77,7 +74,7 @@ Given I drop repository "dnf-ci-fedora"
setup.noarch +2.12.1-1.fc29 +dnf-ci-fedora
"""

@dnf5

Scenario: dnf list setup (when setup is not installed but it is available)
When I execute dnf with args "list setup"
Then stderr is
Expand All @@ -92,7 +89,6 @@ Scenario: dnf list setup (when setup is not installed but it is available)
"""


@dnf5
Scenario: dnf list --installed setup (when setup is installed)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -109,7 +105,6 @@ Given I drop repository "dnf-ci-fedora"
"""


@dnf5
Scenario: List --installed alias packages from all enabled repositories
When I execute dnf with args "install glibc"
Then the exit code is 0
Expand All @@ -131,7 +126,6 @@ Scenario: List --installed alias packages from all enabled repositories
"""


@dnf5
Scenario: dnf list --available setup (when setup is available)
When I execute dnf with args "list --available setup"
Then stderr is
Expand All @@ -146,7 +140,6 @@ Scenario: dnf list --available setup (when setup is available)
"""


@dnf5
Scenario: dnf list setup basesystem (when basesystem is not installed)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -167,7 +160,6 @@ Scenario: dnf list setup basesystem (when basesystem is not installed)
"""


@dnf5
Scenario: dnf list installed setup basesystem (when basesystem is not installed)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -185,7 +177,6 @@ Scenario: dnf list installed setup basesystem (when basesystem is not installed)

# Change in behavior compared to dnf4 - Available section contains all available
# packages, installed versions are not filtered out
@dnf5
Scenario: dnf list available setup basesystem (when basesystem is available)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -204,7 +195,6 @@ Scenario: dnf list available setup basesystem (when basesystem is available)
"""


@dnf5
Scenario: dnf list setup basesystem (when both are installed)
When I execute dnf with args "install setup basesystem"
Then the exit code is 0
Expand Down Expand Up @@ -250,7 +240,6 @@ Scenario: dnf list setup basesystem (when both are installed)
"""


@dnf5
Scenario: dnf list glibc\*
When I execute dnf with args "install glibc"
Then the exit code is 0
Expand All @@ -263,7 +252,6 @@ Given I use repository "dnf-ci-fedora-updates"
Then stdout does not contain "setup"


@dnf5
Scenario Outline: dnf list <upgrades alias>
When I execute dnf with args "install glibc"
Then the exit code is 0
Expand All @@ -288,7 +276,6 @@ Examples:
| --updates |


@dnf5
Scenario: dnf list upgrades glibc (when glibc is not installed)
Given I use repository "dnf-ci-fedora-updates"
When I execute dnf with args "list --upgrades glibc"
Expand All @@ -301,7 +288,6 @@ Given I use repository "dnf-ci-fedora-updates"
And stdout is empty


@dnf5
Scenario: dnf list --obsoletes
When I execute dnf with args "install glibc"
Then the exit code is 0
Expand All @@ -320,7 +306,6 @@ Given I use repository "dnf-ci-fedora-updates"
"""


@dnf5
Scenario: dnf list obsoletes setup (when setup is not obsoleted)
When I execute dnf with args "install setup"
Then the exit code is 0
Expand All @@ -342,7 +327,6 @@ Given I use repository "dnf-ci-thirdparty"
Then stdout contains "forTestingPurposesWeEvenHaveReallyLongVersions.x86_64\s+1435347658326856238756823658aaaa-1\s+dnf-ci-thirdparty"


@dnf5
@bz1800342
Scenario: dnf list respects repo priorities
Given I use repository "dnf-ci-fedora-updates" with configuration
Expand All @@ -362,7 +346,6 @@ Scenario: dnf list respects repo priorities
"""


@dnf5
Scenario: dnf list --showduplicates lists all (even from lower-priority repo)
Given I use repository "dnf-ci-fedora-updates" with configuration
| key | value |
Expand All @@ -384,7 +367,6 @@ Scenario: dnf list --showduplicates lists all (even from lower-priority repo)
"""


@dnf5
@bz1800342
Scenario: dnf list doesn't show any available packages when there are no upgrades in the highest-priority repo
Given I use repository "dnf-ci-fedora-updates" with configuration
Expand All @@ -405,7 +387,6 @@ Scenario: dnf list doesn't show any available packages when there are no upgrade
"""


@dnf5
Scenario: dnf list shows available packages when there are upgrades in the highest-priority repo
Given I use repository "dnf-ci-fedora-updates" with configuration
| key | value |
Expand All @@ -428,7 +409,6 @@ Scenario: dnf list shows available packages when there are upgrades in the highe
"""


@dnf5
Scenario: dnf list doesn't show package with same nevra from lower-priority repo
Given I configure a new repository "dnf-ci-fedora2" with
| key | value |
Expand Down
3 changes: 1 addition & 2 deletions dnf-behave-tests/dnf/log-rotate.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# @dnf5
# TODO(nsella) different stdout
@dnf5
Feature: Log rotation


Expand Down
1 change: 1 addition & 0 deletions dnf-behave-tests/dnf/logs.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@dnf5
Feature: Logs


Expand Down
16 changes: 3 additions & 13 deletions dnf-behave-tests/dnf/mark.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@dnf5
Feature: Mark command


@dnf5
Scenario Outline: Marking non-existent package as <type> fails
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "mark <type> nosuchpkg"
Expand All @@ -19,7 +19,6 @@ Examples:
| weak |


@dnf5
Scenario: Marking as group for non-existent package or non-existent group fails
Given I use repository "dnf-ci-thirdparty"
And I use repository "dnf-ci-fedora"
Expand All @@ -39,7 +38,6 @@ Scenario: Marking as group for non-existent package or non-existent group fails
"""


@dnf5
Scenario: Marking available but not installed package fails
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "mark user lame"
Expand All @@ -51,7 +49,6 @@ Scenario: Marking available but not installed package fails
"""


@dnf5
Scenario: Marking as dependency a list of pkgs when one of them is not available fails
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install lame"
Expand All @@ -68,7 +65,6 @@ Scenario: Marking as dependency a list of pkgs when one of them is not available
| lame-libs-3.100-4.fc29.x86_64 | Dependency |


@dnf5
Scenario: Marking as dependency a list of pkgs when one of them is not available passes with --skip-unavailable
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install lame"
Expand All @@ -84,7 +80,6 @@ Scenario: Marking as dependency a list of pkgs when one of them is not available
| lame-libs-3.100-4.fc29.x86_64 | Dependency |


@dnf5
Scenario Outline: Mark user installed package as <type>
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install lame"
Expand All @@ -102,7 +97,6 @@ Examples:
| weak | Weak Dependency |


@dnf5
Scenario Outline: Mark package installed as dependency as <type>
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install filesystem"
Expand All @@ -124,7 +118,6 @@ Examples:
| weak | Weak Dependency |


@dnf5
Scenario: Mark package as the same reason it currently has
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install lame"
Expand All @@ -146,7 +139,7 @@ Scenario: Mark package as the same reason it currently has
"""


#@dnf5 currently fails, see:
@xfail
# https://github.com/rpm-software-management/dnf5/issues/935
Scenario: Mark user installed package as group
Given I use repository "dnf-ci-thirdparty"
Expand All @@ -172,7 +165,7 @@ Scenario: Mark user installed package as group
| setup-2.12.1-1.fc29.noarch | Dependency |


#@dnf5 currently fails, see:
@xfail
# https://github.com/rpm-software-management/dnf5/issues/935
# TODO (emrakova): update the scenario when the issue is fixed
Scenario: Mark group installed package as user and back again
Expand Down Expand Up @@ -202,7 +195,6 @@ Scenario: Mark group installed package as user and back again
"""


@dnf5
Scenario: Marking dependency as user-installed should not remove it automatically
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install filesystem"
Expand All @@ -226,7 +218,6 @@ Scenario: Marking dependency as user-installed should not remove it automaticall
| remove | setup-0:2.12.1-1.fc29.noarch |


@dnf5
@bz2046581
Scenario: Marking installed package when history DB is not on the system (deleted or not created yet)
When I execute rpm with args "-i {context.dnf.fixturesdir}/repos/dnf-ci-fedora-updates/x86_64/wget-1.19.6-5.fc29.x86_64.rpm"
Expand All @@ -241,7 +232,6 @@ Scenario: Marking installed package when history DB is not on the system (delete
| wget-1.19.6-5.fc29.x86_64 | User |


@dnf5
Scenario: Marking toplevel package as dependency should not remove shared dependencies on autoremove
Given I use repository "dnf-ci-fedora"
When I execute dnf with args "install nss_hesiod libnsl"
Expand Down
7 changes: 2 additions & 5 deletions dnf-behave-tests/dnf/metadata.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@dnf5
Feature: Testing DNF metadata handling

@dnf5

@bz1644283
Scenario: update expired metadata on first dnf update
Given I create directory "/temp-repos/temp-repo"
Expand All @@ -26,7 +27,6 @@ Given I copy directory "{context.scenario.repos_location}/dnf-ci-fedora" to "/te
And stdout contains "\s+wget.src\s+1.19.5-5.fc29\s+testrepo"


@dnf5
@bz1866505
Scenario: I cannot create/overwrite a file in /etc from local repository
# This directory structure is needed at the repo source so that it can be matched on the system running dnf
Expand All @@ -49,7 +49,6 @@ Given I create file "/a/etc/malicious.file" with
Then file "/etc/malicious.file" does not exist


@dnf5
@bz1866505
Scenario: I cannot create/overwrite a file in /etc from remote repository
Given I create file "/a/etc/malicious.file" with
Expand All @@ -74,8 +73,6 @@ Given I create file "/a/etc/malicious.file" with
Then file "/etc/malicious.file" does not exist


# @dnf5
# TODO(nsella) different stdout
Scenario: present user understandable message when there is a mismatch between available repodata and packages
Given I copy repository "simple-base" for modification
And I use repository "simple-base" as http
Expand Down
Loading

0 comments on commit b3c0059

Please sign in to comment.