Skip to content

Commit

Permalink
fix: correct issues in upgrade and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Oct 11, 2018
1 parent 4948e2b commit 1542a95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions common-functions
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ service_container_rm() {
[[ -z "$ID" ]] && return 0

dokku_log_verbose_quiet "Removing container"
docker update --restart=no "$SERVICE_NAME" > /dev/null 2>&1
if ! docker rm "$SERVICE_NAME" > /dev/null 2>&1; then
dokku_log_fail "Unable to remove container for service $SERVICE"
fi
Expand Down
4 changes: 2 additions & 2 deletions subcommands/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ service-upgrade-cmd() {
verify_service_name "$SERVICE"

local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
local ID="$(cat "$SERVICE_ROOT/ID")"
is_container_status "$ID" "Running" || dokku_log_fail "Service ${SERVICE} container is not running"

service_parse_args "${@:2}"

Expand All @@ -40,6 +38,7 @@ service-upgrade-cmd() {
if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then
dokku_log_info2 "Stopping all linked services"
for app in $(service_linked_apps "$SERVICE"); do
[[ "$app" == "-" ]] && continue
ps_stop "$app"
done
fi
Expand All @@ -51,6 +50,7 @@ service-upgrade-cmd() {
if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then
dokku_log_info2 "Starting all linked services"
for app in $(service_linked_apps "$SERVICE"); do
[[ "$app" == "-" ]] && continue
ps_start "$app"
done
fi
Expand Down
1 change: 0 additions & 1 deletion tests/test_helper.bash
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash
export DOKKU_QUIET_OUTPUT=1
export DOKKU_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku"
export DOKKU_VERSION=${DOKKU_VERSION:-"master"}
export PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin:$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku:$PATH"
Expand Down

0 comments on commit 1542a95

Please sign in to comment.