mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
don't use exit 0 in config functions
This commit is contained in:
@@ -102,7 +102,7 @@ config_all() {
|
||||
[[ "$1" == "config" ]] || set -- "config" "$@"
|
||||
config_parse_args "$@"
|
||||
config_create "$ENV_FILE"
|
||||
is_config_export "$@" && config_export "$DOKKU_CONFIG_TYPE" "$APP" && exit 0
|
||||
is_config_export "$@" && config_export "$DOKKU_CONFIG_TYPE" "$APP" && return 0
|
||||
|
||||
[[ "$APP" ]] && DOKKU_CONFIG_TYPE=$APP
|
||||
[[ ! -s $ENV_FILE ]] && dokku_log_fail "no config vars for $DOKKU_CONFIG_TYPE"
|
||||
@@ -112,7 +112,7 @@ config_all() {
|
||||
for var in "$@"; do
|
||||
if [[ "$var" == "--shell" ]]; then
|
||||
echo $VARS
|
||||
exit 0
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -132,7 +132,7 @@ config_get() {
|
||||
|
||||
config_create "$ENV_FILE"
|
||||
if [[ ! -s $ENV_FILE ]]; then
|
||||
exit 0
|
||||
return 0
|
||||
fi
|
||||
|
||||
KEY="$3"
|
||||
|
||||
@@ -11,7 +11,7 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(build-env) special characters" {
|
||||
run dokku config:set $TEST_APP NEWRELIC_APP_NAME="$TEST_APP (Staging)"
|
||||
run dokku config:set --no-restart $TEST_APP NEWRELIC_APP_NAME="$TEST_APP (Staging)"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -19,3 +19,14 @@ teardown() {
|
||||
run dokku config $TEST_APP
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(build-env) failure" {
|
||||
run dokku config:set --no-restart $TEST_APP BUILDPACK_URL='https://github.com/dokku/fake-buildpack'
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run deploy_app
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user