From cc5c7fee25480569bdd2e73de6a7439ffaba4c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guitaut?= Date: Tue, 8 Sep 2015 22:57:42 +0200 Subject: [PATCH] Ability to echo back invoked command for docker By setting `ECHO_DOCKER_COMMAND` to `true`, the mocked docker binary will echo back the command used to call it instead of mocking a response. --- tests/bin/docker | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/bin/docker b/tests/bin/docker index 87eeee5..3c417ee 100755 --- a/tests/bin/docker +++ b/tests/bin/docker @@ -1,4 +1,9 @@ #!/usr/bin/env bash +if [[ $ECHO_DOCKER_COMMAND == "true" ]]; then + echo "$(basename "$0") $*" + exit 0 +fi + case "$1" in stop) echo "testid"