Merge pull request #3699 from robhudson/add-cleanup-help

Add `dokku cleanup` to help output
This commit is contained in:
Jose Diaz-Gonzalez
2019-09-28 20:59:33 -04:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -1,14 +1,15 @@
#!/usr/bin/env bash
[[ " help help:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
[[ " help help:help cleanup:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | run:help | trace:help | url:help | urls:help | version:help)
help | cleanup:help | run:help | trace:help | url:help | urls:help | version:help)
[[ $(echo "$1" | sed '/.*:help/!d') ]] && help_topic="${1%\:help}"
help_content_func() {
declare desc="return standard plugin help content"
cat <<help_content
cleanup [<app>], Cleans up exited/dead Docker containers and removes dangling images
run [--env KEY=VALUE] <app> <cmd>, Run a command in a new container using the current application image
url <app>, Show the first URL for an application (compatibility)
urls <app>, Show all URLs for an application

View File

@@ -31,6 +31,13 @@ assert_url() {
assert_output "${url}"
}
@test "(core) cleanup:help" {
run /bin/bash -c "dokku cleanup:help"
echo "output: $output"
echo "status: $status"
assert_output_contains "Cleans up exited/dead Docker containers and removes dangling image"
}
@test "(core) run (with --options)" {
deploy_app
run /bin/bash -c "dokku --force --quiet run $TEST_APP node --version"