drop support for create/delete in favor of standard apps:create and apps:destroy

This commit is contained in:
Michael Hobbs
2015-01-17 16:24:50 -08:00
parent 666f2d7434
commit 2ff2ca55c1
2 changed files with 9 additions and 8 deletions

View File

@@ -54,12 +54,13 @@ if [[ ! -z $DOKKU_HOST ]]; then
if [[ "$appname" != "" ]] && [[ -n "$*" ]]; then if [[ "$appname" != "" ]] && [[ -n "$*" ]]; then
case "$1" in case "$1" in
apps*|backup*|help|plugins*|ps:restartall|trace|version) apps|backup*|help|plugins*|ps:restartall|trace|version)
true true
;; ;;
delete) apps:destroy)
verb="apps:destroy" if [[ -z "$2" ]] || [[ "$2" == "force" ]];then
donotshift="YES" donotshift="YES"
fi
;; ;;
*) *)
donotshift="YES" donotshift="YES"
@@ -67,7 +68,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
esac esac
fi fi
if [[ "$1" = "create" ]]; then if [[ "$1" = "apps:create" ]] && [[ -z "$2" ]]; then
appname=$(random_name) appname=$(random_name)
counter=0 counter=0
while ssh "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do while ssh "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do

View File

@@ -165,13 +165,13 @@ teardown() {
assert_success assert_success
} }
@test "dokku client (create/delete)" { @test "dokku client (apps:create AND apps:destroy)" {
setup_client_repo setup_client_repo
run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh create" run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh apps:create"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success
run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh delete force" run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh apps:destroy force"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success