Skip to content

Commit

Permalink
dnf5 config-manager: Add test from-repofile with comments and emty line
Browse files Browse the repository at this point in the history
  • Loading branch information
jrohel authored and jan-kolarik committed Sep 6, 2024
1 parent dab0e39 commit 16d1d44
Showing 1 changed file with 25 additions and 0 deletions.
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

0 comments on commit 16d1d44

Please sign in to comment.