fix: Properly handle updated config functions

Closes dokku/dokku-redis#90
This commit is contained in:
Jose Diaz-Gonzalez
2017-12-02 13:43:18 -05:00
parent 726de062a6
commit 99307312c9
5 changed files with 19 additions and 7 deletions

View File

@@ -2,10 +2,9 @@ sudo: required
dist: trusty
language: bash
env:
- DOKKU_VERSION=master
- DOKKU_VERSION=v0.7.0
- DOKKU_VERSION=v0.6.0
- DOKKU_VERSION=v0.5.0
- DOKKU_VERSION=v0.4.0
before_install: make setup
- DOKKU_VERSION=system-user DOKKU_SYSTEM_GROUP=travis DOKKU_SYSTEM_USER=travis
- DOKKU_VERSION=v0.7.0 DOKKU_SYSTEM_GROUP=travis DOKKU_SYSTEM_USER=travis
- DOKKU_VERSION=v0.6.0 DOKKU_SYSTEM_GROUP=travis DOKKU_SYSTEM_USER=travis
- DOKKU_VERSION=v0.5.0 DOKKU_SYSTEM_GROUP=travis DOKKU_SYSTEM_USER=travis
- DOKKU_VERSION=v0.4.0 DOKKU_SYSTEM_GROUP=travis DOKKU_SYSTEM_USER=travis
script: make test

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
docker_ports_options() {
declare desc="Exports a list of exposed ports"

View File

@@ -39,7 +39,12 @@ teardown() {
@test "($PLUGIN_COMMAND_PREFIX:unlink) removes link from docker-options" {
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app >&2
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
options=$(dokku docker-options my_app | xargs)
report_action="docker-options"
[[ "$(dokku version)" == "master" ]] && report_action="docker-options:report"
[[ "$(at-least-version 0.8.1 "$(dokku version)")" == "true" ]] && report_action="docker-options:report"
options=$(dokku docker-options $report_action | xargs)
check_value=""
[[ "$(dokku version)" == "master" ]] && check_value="Deploy options: --restart=on-failure:10"
[[ "$(at-least-version 0.7.0 "$(dokku version)")" == "true" ]] && check_value="Deploy options: --restart=on-failure:10"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/test_helper.bash"
BIN_STUBS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin"
@@ -10,6 +11,11 @@ fi
cd $DOKKU_ROOT
echo "Dokku version $DOKKU_VERSION"
git checkout $DOKKU_VERSION > /dev/null
if grep go-build Makefile > /dev/null; then
mv "$BIN_STUBS/docker" "$BIN_STUBS/docker-stub"
make go-build
mv "$BIN_STUBS/docker-stub" "$BIN_STUBS/docker"
fi
cd -
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/config"

View File

@@ -11,6 +11,7 @@ export PLUGIN_CORE_AVAILABLE_PATH="$PLUGIN_PATH"
export REDIS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/fixtures"
export PLUGIN_DATA_ROOT="$REDIS_ROOT"
export PLUGIN_CONFIG_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config"
export DOKKU_LIB_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/lib-root"
if [[ "$(uname)" == "Darwin" ]]; then
export PLUGN_URL="https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_darwin_x86_64.tgz"
else