Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnf5 config-manager: Add test from-repofile with comments and emty line #1545

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions dnf-behave-tests/dnf/plugins-core/config-manager-addrepo.feature
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,31 @@ Scenario: test "addrepo" from repofile
"""


Scenario: test "addrepo" from repofile with comments and empty line
Given I create file "/{context.dnf.tempdir}/tmp/test.repo" with
"""
# Repository configuration file
[test] # Test repo
name=repository file

enabled=0
# URL to repository
baseurl=http://something.com/os/
"""
And I execute dnf with args "config-manager addrepo --from-repofile={context.dnf.tempdir}/tmp/test.repo"
Then the exit code is 0
And file "/etc/yum.repos.d/test.repo" contents is
"""
# Repository configuration file
[test] # Test repo
name=repository file

enabled=0
# URL to repository
baseurl=http://something.com/os/
"""


Scenario: "addrepo" from repofile, source file without .repo extension, adding the .repo extension to the destination filename
Given I create file "/{context.dnf.tempdir}/tmp/test" with
"""
Expand Down
Loading