Skip to content

Commit

Permalink
Add 5 test scenarios for deplist
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek committed Sep 23, 2016
1 parent e5a6cbb commit f1df0ce
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions dnf-docker-test/features/deplist-1.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
@xfail
Feature: Deplist as commmand and option

Scenario: Feature Setup
Given I use the repository "upgrade_1"

Scenario: Deplist as command
When I successfully run "dnf deplist TestA"
Then the command stdout should contain exactly
"""
package: TestA-1.0.0-1.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
package: TestA-1.0.0-2.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
"""

Scenario: Deplist as repoquery option
When I successfully run "dnf repoquery --deplist TestA"
Then the command stdout should contain exactly
"""
package: TestA-1.0.0-1.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
package: TestA-1.0.0-2.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
"""

Scenario: Deplist as repoquery option but using dnf bin
When I successfully run "sh -c 'dnf repoquery --deplist TestA'"
Then the command stdout should contain exactly
"""
package: TestA-1.0.0-1.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
package: TestA-1.0.0-2.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
"""

Scenario: Deplist with --latest-limit
When I successfully run "dnf repoquery --deplist --latest-limit 1 TestA"
Then the command stdout should contain exactly
"""
package: TestA-1.0.0-2.noarch
dependency: TestB
provider: TestB-1.0.0-2.noarch
"""

Scenario: Deplist with --latest-limit and verbose
When I execute "dnf" command "repoquery --deplist --latest-limit 1 --verbose TestA" with "success"
Then line from "stdout" should "start" with "package: TestA-1.0.0-2.noarch"
And line from "stdout" should "start" with " dependency: TestB"
And line from "stdout" should "start" with " provider: TestB-1.0.0-1.noarch"
And line from "stdout" should "start" with " provider: TestB-1.0.0-2.noarch"

0 comments on commit f1df0ce

Please sign in to comment.