From e974b84a68e32e300e8e34b35364fb157a52950c Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 2 May 2024 10:35:43 -0400 Subject: [PATCH] dist: more aggressive docker stop Trying to avoid a second test instance run after the first encountering an error of the form: ``` Bind for 0.0.0.0:8443 failed: port is already allocated. ``` --- rustls-libssl/dist/test/deb-ubuntu-22/run-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rustls-libssl/dist/test/deb-ubuntu-22/run-test.sh b/rustls-libssl/dist/test/deb-ubuntu-22/run-test.sh index e51d89a..4e2a778 100755 --- a/rustls-libssl/dist/test/deb-ubuntu-22/run-test.sh +++ b/rustls-libssl/dist/test/deb-ubuntu-22/run-test.sh @@ -3,11 +3,11 @@ set -e TAG="$1" -docker run --init --interactive --publish 8443:443 "$TAG" & -DOCKER_ID=$! +docker run --interactive --publish 8443:443 "$TAG" & sleep 2 output_got=$(curl --cacert ca.cert https://localhost:8443/) -kill "$DOCKER_ID" +docker stop "$(docker ps --quiet)" + diff --unified --report-identical-files <(echo "hello world") <(echo "$output_got")