feat: Add the ability to ignore existing applications during a git clone

This makes it possible to create cloned apps if and only if they haven't already been created - a useful feature for review apps.
This commit is contained in:
Jose Diaz-Gonzalez
2018-04-27 00:03:19 -04:00
parent 380e8affba
commit 1dfa02924d
3 changed files with 47 additions and 8 deletions

View File

@@ -131,7 +131,10 @@ teardown () {
echo "output: "$output
echo "status: "$status
assert_success
}
@test "(apps) apps:clone --skip-deploy" {
deploy_app
run bash -c "dokku apps:clone --skip-deploy $TEST_APP great-test-name"
echo "output: "$output
echo "status: "$status
@@ -146,6 +149,22 @@ teardown () {
assert_success
}
@test "(apps) apps:clone --ignore-existing" {
deploy_app
run bash -c "dokku apps:create great-test-name"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "dokku apps:clone --ignore-existing $TEST_APP great-test-name"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "dokku --force apps:destroy great-test-name"
echo "output: "$output
echo "status: "$status
assert_success
}
@test "(apps) apps:exists" {
run dokku apps:exists $TEST_APP
echo "output: "$output