|
| 1 | +Feature: push |
| 2 | + Push commits to remote |
| 3 | + |
| 4 | + Scenario: Push available commits to remote |
| 5 | + Given a mocked git configuration |
| 6 | + And a puppet module "puppet-test" from "awesome" |
| 7 | + And a file named "managed_modules.yml" with: |
| 8 | + """ |
| 9 | + --- |
| 10 | + puppet-test: |
| 11 | + namespace: awesome |
| 12 | + """ |
| 13 | + And a file named "modulesync.yml" with: |
| 14 | + """ |
| 15 | + --- |
| 16 | + branch: modulesync |
| 17 | + """ |
| 18 | + And a git_base option appended to "modulesync.yml" for local tests |
| 19 | + And I successfully run `msync reset` |
| 20 | + And I cd to "modules/awesome/puppet-test" |
| 21 | + And I run `touch hello` |
| 22 | + And I run `git add hello` |
| 23 | + And I run `git commit -m'Hello!'` |
| 24 | + And I cd to "~" |
| 25 | + Then the puppet module "puppet-test" from "awesome" should have no commits made by "Aruba" |
| 26 | + When I successfully run `msync push --verbose` |
| 27 | + Then the puppet module "puppet-test" from "awesome" should have 1 commit made by "Aruba" in branch "modulesync" |
| 28 | +
|
| 29 | + @announce-output |
| 30 | + Scenario: Push command without a branch sets |
| 31 | + Given a basic setup with a puppet module "puppet-test" from "awesome" |
| 32 | + When I run `msync push --verbose` |
| 33 | + Then the exit status should be 1 |
| 34 | + And the stderr should contain: |
| 35 | + """ |
| 36 | + Error: 'branch' option is missing, please set it in configuration or in command line. |
| 37 | + """ |
| 38 | +
|
| 39 | + Scenario: Report the need to clone repositories if sourcecode was not cloned before |
| 40 | + Given a basic setup with a puppet module "puppet-test" from "awesome" |
| 41 | + And the global option "branch" sets to "modulesync" |
| 42 | + When I run `msync push --verbose` |
| 43 | + Then the exit status should be 1 |
| 44 | + And the stderr should contain: |
| 45 | + """ |
| 46 | + puppet-test: Repository must be locally available before trying to push |
| 47 | + """ |
0 commit comments