Add tests for every implemented command

This commit is contained in:
Loïc Guitaut
2015-09-10 11:57:24 +02:00
parent 860e5c7f9b
commit ca88f2bdce
21 changed files with 456 additions and 33 deletions

View File

@@ -1,4 +1,13 @@
#!/usr/bin/env bash
# shellcheck source=../../config
# shellcheck disable=SC1091
source "$(dirname "$0")/../../config"
if [[ $ECHO_DOCKER_COMMAND == "true" ]]; then
echo "$(basename "$0") $*"
exit 0
fi
case "$1" in
stop)
echo "testid"
@@ -42,6 +51,15 @@ case "$1" in
exit 0
fi
if [[ $@ =~ \{\{\.State\..*\}\} ]]; then
if [[ $@ =~ \{\{\.State\.Running\}\} ]]; then
echo "true"
else
echo "false"
fi
exit 0
fi
# running
echo "true"
;;
@@ -61,6 +79,9 @@ case "$1" in
pull)
exit 0
;;
logs)
echo "$PLUGIN_SERVICE $PLUGIN_IMAGE_VERSION"
;;
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;