Explorar o código

Merge pull request #1169 from infosiftr/retry-bail

Adjust "retry.sh" to bail if our container does
yosifkit %!s(int64=10) %!d(string=hai) anos
pai
achega
5643dd4147
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      test/retry.sh

+ 5 - 0
test/retry.sh

@@ -32,6 +32,11 @@ while ! eval "$@" &> /dev/null; do
 		eval "$@" # to hopefully get a useful error message
 		false
 	fi
+	if [ "$cid" ] && [ "$(docker inspect -f '{{.State.Running}}' "$cid" 2>/dev/null)" != 'true' ]; then
+		echo >&2 "${image:-the container} stopped unexpectedly!"
+		( set -x && docker logs "$cid" ) >&2 || true
+		false
+	fi
 	echo >&2 -n .
 	sleep "$sleep"
 done