1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-07 21:58:41 +02:00

Move showlinked code from commandline to _private

This commit is contained in:
2022-11-09 10:31:20 +01:00
parent 2f70408dea
commit 4634690176
6 changed files with 82 additions and 16 deletions

View File

@@ -0,0 +1,17 @@
Feature: `osc showlinked` command
# common steps for all scenarios
Background:
Given I set working directory to "{context.osc.temp}"
And I execute osc with args "checkout test:factory/test-pkgA"
And I set working directory to "{context.osc.temp}/test:factory/test-pkgA"
And I execute osc with args "linkpac test:factory/test-pkgA home:Admin --force"
Scenario: Run `osc showlinked`
When I execute osc with args "showlinked"
Then stdout is
"""
home:Admin/test-pkgA
"""

View File

@@ -0,0 +1,17 @@
Feature: `osc showlinked` command
# common steps for all scenarios
Background:
Given I set working directory to "{context.osc.temp}"
And I execute osc with args "checkout test:factory"
And I set working directory to "{context.osc.temp}/test:factory"
Scenario: Run `osc showlinked`
When I execute osc with args "showlinked"
Then the exit code is 1
And stderr is
"""
Directory '{context.osc.temp}/test:factory' is not a working copy of a package
"""

View File

@@ -0,0 +1,23 @@
Feature: `osc showlinked` command
# common steps for all scenarios
Background:
Given I set working directory to "{context.osc.temp}"
And I execute osc with args "linkpac test:factory/test-pkgA home:Admin --force"
Scenario: Run `osc showlinked <project> <package>`
When I execute osc with args "showlinked test:factory test-pkgA"
Then stdout is
"""
home:Admin/test-pkgA
"""
Scenario: Run `osc showlinked <project>/<package>`
When I execute osc with args "showlinked test:factory/test-pkgA"
Then stdout is
"""
home:Admin/test-pkgA
"""