-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust versionlock-list.feature tests to dnf5
I've removed most of the tests, because dnf5 works correctly without versionlock configuration file.
- Loading branch information
Showing
1 changed file
with
7 additions
and
65 deletions.
There are no files selected for viewing
72 changes: 7 additions & 65 deletions
72
dnf-behave-tests/dnf/plugins-core/versionlock-list.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,21 @@ | ||
@dnf5 | ||
Feature: Tests missing or misconfigured versionlock.list file in versionlock plugin | ||
|
||
|
||
Background: Set up versionlock infrastructure in the installroot | ||
Given I enable plugin "versionlock" | ||
# plugins do not honor installroot when searching their configuration | ||
# all the next steps are merely to set up versionlock plugin inside installroot | ||
And I configure dnf with | ||
| key | value | | ||
| pluginconfpath | {context.dnf.installroot}/etc/dnf/plugins | | ||
And I create and substitute file "/etc/dnf/plugins/versionlock.conf" with | ||
Given I create file "/etc/dnf/versionlock.toml" with | ||
""" | ||
[main] | ||
enabled = 1 | ||
locklist = {context.dnf.installroot}/etc/dnf/plugins/versionlock.list | ||
""" | ||
And I create file "/etc/dnf/plugins/versionlock.list" with | ||
""" | ||
""" | ||
# check that both locked and newer versions of the package are available | ||
Given I use repository "dnf-ci-fedora" | ||
And I use repository "dnf-ci-fedora-updates" | ||
|
||
|
||
Scenario: dnf will fail if versionlock.list file is missing | ||
Given I delete file "/etc/dnf/plugins/versionlock.list" | ||
When I execute dnf with args "check-update" | ||
Then the exit code is 1 | ||
|
||
|
||
Scenario: dnf will fail if versionlock.list path is missing from conf | ||
Given I create file "/etc/dnf/plugins/versionlock.conf" with | ||
""" | ||
[main] | ||
enabled=1 | ||
""" | ||
When I execute dnf with args "check-update" | ||
Then the exit code is 1 | ||
|
||
|
||
Scenario Outline: dnf versionlock <option> <package> will fail if versionlock.list file is missing | ||
Given I delete file "/etc/dnf/plugins/versionlock.list" | ||
When I execute dnf with args "versionlock <option> <package>" | ||
Then the exit code is 1 | ||
|
||
Examples: | ||
| option | package | | ||
| list | | | ||
| delete | abcde | | ||
| add | abcde | | ||
| exclude | abcde | | ||
|
||
|
||
Scenario: dnf versionlock clear will create empty file if versionlock.list is missing | ||
Given I delete file "/etc/dnf/plugins/versionlock.list" | ||
Given I delete file "/etc/dnf/versionlock.toml" | ||
When I execute dnf with args "versionlock clear" | ||
Then the exit code is 0 | ||
And file "/etc/dnf/plugins/versionlock.list" exists | ||
And file "/etc/dnf/plugins/versionlock.list" contents is | ||
""" | ||
And file "/etc/dnf/versionlock.toml" exists | ||
And file "/etc/dnf/versionlock.toml" contents is | ||
""" | ||
|
||
|
||
Scenario Outline: dnf versionlock <option> <package> will fail if versionlock.list path is missing from conf | ||
Given I create file "/etc/dnf/plugins/versionlock.conf" with | ||
packages = [] | ||
version = "1.0" | ||
""" | ||
[main] | ||
enabled=1 | ||
""" | ||
When I execute dnf with args "versionlock <option> <package>" | ||
Then the exit code is 1 | ||
|
||
Examples: | ||
| option | package | | ||
| list | | | ||
| clear | | | ||
| add | abcde | | ||
| delete | abcde | | ||
| exclude | abcde | |