From 06f868d76f0e78372beca040b1827098573beab3 Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Sat, 30 Nov 2019 23:49:31 -0500 Subject: [PATCH] Added timeout of 0 to container stop command. --- docker_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker_test.sh b/docker_test.sh index c7678a3..25ee4a5 100755 --- a/docker_test.sh +++ b/docker_test.sh @@ -423,18 +423,18 @@ function run_test { ./ssh-audit.py localhost:2222 > $test_result_stdout if [[ $? != 0 ]]; then echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" - docker container stop $cid > /dev/null + docker container stop -t 0 $cid > /dev/null exit 1 fi ./ssh-audit.py -j localhost:2222 > $test_result_json if [[ $? != 0 ]]; then echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" - docker container stop $cid > /dev/null + docker container stop -t 0 $cid > /dev/null exit 1 fi - docker container stop $cid > /dev/null + docker container stop -t 0 $cid > /dev/null if [[ $? != 0 ]]; then echo -e "${REDB}Failed to stop docker container ${cid}! (exit code: $?)${CLR}" exit 1