fix: update tests to properly handle case where app is not running

This commit is contained in:
Jose Diaz-Gonzalez
2023-02-21 00:48:22 -05:00
parent 554bf4c3b4
commit c86a482415
3 changed files with 8 additions and 5 deletions

View File

@@ -633,6 +633,7 @@ service_link() {
plugn trigger service-action post-link "$PLUGIN_COMMAND_PREFIX" "$SERVICE" "$APP"
if [[ "$DOKKU_GLOBAL_FLAGS" == *"--no-restart"* ]] || [[ "$SERVICE_RESTART_APPS" == "false" ]]; then
config_set --no-restart "$APP" "${ALIAS}_URL=$SERVICE_URL"
dokku_log_verbose "Skipping restart of linked app"
else
config_set "$APP" "${ALIAS}_URL=$SERVICE_URL"
fi
@@ -977,6 +978,7 @@ service_unlink() {
plugn trigger service-action post-unlink "$PLUGIN_COMMAND_PREFIX" "$SERVICE" "$APP"
if [[ "$DOKKU_GLOBAL_FLAGS" == *"--no-restart"* ]] || [[ "$SERVICE_RESTART_APPS" == "false" ]]; then
config_unset --no-restart "$APP" "${LINK[@]}"
dokku_log_verbose "Skipping restart of linked app"
else
config_unset "$APP" "${LINK[@]}"
fi