fix: Properly handle updated config functions

Closes dokku/dokku-redis#90
This commit is contained in:
Jose Diaz-Gonzalez
2018-01-12 06:11:53 -05:00
parent 65e2999f31
commit c6f38b2c1b
5 changed files with 19 additions and 7 deletions

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"