diff --git a/tests/00.sh b/tests/00.sh index d9ab1c9..8b16b08 100755 --- a/tests/00.sh +++ b/tests/00.sh @@ -48,8 +48,14 @@ run "docker run -d --rm --platform ${ARCH} \ run "sleep 20" # Startup-time is longer on cross-platform run "docker ps" run "docker logs ${RAND_NAME}" -run "curl -sS localhost/index.html" -run "curl -sS localhost/index.html | grep 'hello world'" +if ! run "curl -sS localhost/index.html"; then + run "docker stop ${RAND_NAME}" + exit 1 +fi +if ! run "curl -sS localhost/index.html | grep 'hello world'"; then + run "docker stop ${RAND_NAME}" + exit 1 +fi ### diff --git a/tests/01.sh b/tests/01.sh index 1470141..3d9e3e5 100755 --- a/tests/01.sh +++ b/tests/01.sh @@ -59,9 +59,16 @@ run "sleep 20" # Startup-time is longer on cross-platform run "docker ps" run "docker logs ${RAND_NAME1}" run "docker logs ${RAND_NAME2}" -run "curl localhost" -run "curl localhost | grep 'hello world php'" - +if ! run "curl localhost"; then + run "docker stop ${RAND_NAME1}" + run "docker stop ${RAND_NAME2}" + exit 1 +fi +if ! run "curl localhost | grep 'hello world php'"; then + run "docker stop ${RAND_NAME1}" + run "docker stop ${RAND_NAME2}" + exit 1 +fi ### ### Cleanup