Added timeout of 0 to container stop command.

This commit is contained in:
Joe Testa 2019-11-30 23:49:31 -05:00
parent 8e3e8aa423
commit 06f868d76f

View File

@ -423,18 +423,18 @@ function run_test {
./ssh-audit.py localhost:2222 > $test_result_stdout ./ssh-audit.py localhost:2222 > $test_result_stdout
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" 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 exit 1
fi fi
./ssh-audit.py -j localhost:2222 > $test_result_json ./ssh-audit.py -j localhost:2222 > $test_result_json
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo -e "${REDB}Failed to run ssh-audit.py! (exit code: $?)${CLR}" 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 exit 1
fi fi
docker container stop $cid > /dev/null docker container stop -t 0 $cid > /dev/null
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo -e "${REDB}Failed to stop docker container ${cid}! (exit code: $?)${CLR}" echo -e "${REDB}Failed to stop docker container ${cid}! (exit code: $?)${CLR}"
exit 1 exit 1