1
0
mirror of https://github.com/openSUSE/osc.git synced 2026-02-18 18:01:59 +01:00
Files
github.com_openSUSE_osc/behave/features/fork.feature

34 lines
1.5 KiB
Gherkin

Feature: `osc fork` command
Background:
Given I set working directory to "{context.osc.temp}"
@destructive
Scenario: Fork a git repo
When I execute osc with args "fork test:factory test-GitPkgA"
Then the exit code is 0
And stdout contains " scmsync URL: "
And stdout contains "/Admin/test-GitPkgA#factory"
@destructive
Scenario: Fork multiple git repos from different orgs
When I execute git-obs with args "-G admin api -X POST /orgs --data '{{"username": "devel"}}'"
When I execute osc with args "fork test:factory test-GitPkgA --target-project=test:devel --no-devel-project --gitea-fork-org=devel"
Then the exit code is 0
And stdout contains " scmsync URL: "
And stdout contains "/devel/test-GitPkgA#factory"
When I execute osc with args "fork test:factory test-GitPkgA --target-project=home:Admin --no-devel-project"
Then the exit code is 0
And stdout contains " scmsync URL: "
And stdout contains "/Admin/test-GitPkgA#factory"
When I execute osc with args "fork test:devel test-GitPkgA --target-project=home:Admin --no-devel-project"
# there's an existing fork from a different org, the command fails
Then the exit code is 1
When I execute osc with args "fork test:devel test-GitPkgA --target-project=home:Admin --new-repo-name="test-GitPkgA-devel" --no-devel-project"
Then the exit code is 0
And stdout contains " scmsync URL: "
And stdout contains "/Admin/test-GitPkgA-devel#factory"