-
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.
Test configuring repositories through command line options
- Loading branch information
Showing
2 changed files
with
91 additions
and
34 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
@dnf5 | ||
Feature: Configure repos through cmd line options | ||
|
||
|
||
Scenario: Exit with an error when trying to --enable-repo='*' when there are no repo files | ||
When I execute dnf with args "repo list --enable-repo='*'" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "*". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
Scenario: Exit with an error when trying to enable missing repo | ||
Given I use repository "simple-base" | ||
When I execute dnf with args "repo list --enable-repo='missing-repo'" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "missing-repo". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
Scenario: Exit with an error when trying to enable multiple missing repos | ||
Given I use repository "simple-base" | ||
When I execute dnf with args "repo list --enable-repo='missing-repo1' --enable-repo='missing-repo2'" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "missing-repo1, missing-repo2". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
Scenario: Enabling enabled repo is ok | ||
Given I use repository "simple-base" | ||
When I execute dnf with args "repo list --enable-repo='simple-base'" | ||
Then the exit code is 0 | ||
And stdout is | ||
""" | ||
repo id repo name | ||
simple-base simple-base test repository | ||
""" | ||
|
||
|
||
Scenario: Exit with an error when trying to --disable-repo='*' when there are no repo files | ||
When I execute dnf with args "repo list --disable-repo='*'" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "*". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
# When there are no repositories the --repo options error report includes "*" because it | ||
# is used internally to disable all repos. This might be confusing to users but the situation | ||
# where there are no repos should be pretty rare. | ||
Scenario: Exit with an error when using --repo but there are no repositories | ||
When I execute dnf with args "repo list --repo='missing-repo'" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "*, missing-repo". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
Scenario: Exit with an error when --repo specifies invalid repository | ||
Given I use repository "simple-base" | ||
When I execute dnf with args "repo list --repo='missing-repo'" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "missing-repo". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
Scenario: Exit with an error when --setop specifies invalid repository | ||
When I execute dnf with args "repo list --setopt=missing-repo.best=true" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "missing-repo". Add "--help" for more information about the arguments. | ||
""" | ||
|
||
|
||
Scenario: Exit with an error when trying --setop for all repos but there are none | ||
When I execute dnf with args "repo list --setopt=*.best=true" | ||
Then the exit code is 2 | ||
And stderr is | ||
""" | ||
No matching repositories for "*". Add "--help" for more information about the arguments. | ||
""" |
34 changes: 0 additions & 34 deletions
34
dnf-behave-tests/dnf/repolist-enablerepo-disablerepo.feature
This file was deleted.
Oops, something went wrong.