diff --git a/plugins/00_dokku-standard/commands b/plugins/00_dokku-standard/commands index 871a2854b..7e830763a 100755 --- a/plugins/00_dokku-standard/commands +++ b/plugins/00_dokku-standard/commands @@ -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 <], Cleans up exited/dead Docker containers and removes dangling images run [--env KEY=VALUE] , Run a command in a new container using the current application image url , Show the first URL for an application (compatibility) urls , Show all URLs for an application diff --git a/tests/unit/40_core_2.bats b/tests/unit/40_core_2.bats index ffd74ff6b..f237a56c5 100644 --- a/tests/unit/40_core_2.bats +++ b/tests/unit/40_core_2.bats @@ -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"