Add tests for every implemented command

This commit is contained in:
Loïc Guitaut
2015-09-10 16:21:35 +02:00
parent 5ffe614ad0
commit 12557fbaa1
18 changed files with 425 additions and 29 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"
;;