Skip to content

Commit

Permalink
Tests for dnf5daemon enable/disable repo functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kolarik authored and m-blaha committed Mar 6, 2024
1 parent 7c6c7cb commit addcc68
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions dnf-behave-tests/dnf/dnf5daemon/repo-enable-disable.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@dnf5daemon
Feature: Enable/disable repo functionality for dnf5daemon


Background:
Given I use repository "dnf-ci-fedora"
And I use repository "dnf-ci-fedora-updates"


Scenario: Disable existing repositories
Given I execute dnf with args "repo disable dnf-ci-fedora dnf-ci-fedora-updates"
Then the exit code is 0
When I execute dnf with args "repolist"
Then stdout is empty


Scenario: Enable disabled repositories
Given I execute dnf with args "repo disable dnf-ci-fedora dnf-ci-fedora-updates"
Then the exit code is 0
When I execute dnf with args "repo enable dnf-ci-fedora-updates"
Then the exit code is 0
When I execute dnf with args "repolist"
Then stdout is
"""
repo id repo name
dnf-ci-fedora-updates dnf-ci-fedora-updates test repository
"""


Scenario: Enable non-existing repositories
Given I execute dnf with args "repo enable unknown-repo1 dnf-ci-fedora unknown-repo2"
Then the exit code is 1
And stderr is
"""
[org.rpm.dnf.v0.rpm.Repo.NoMatchingIdError] No matching repositories found for following ids: unknown-repo1,unknown-repo2
"""

0 comments on commit addcc68

Please sign in to comment.