Skip to content

Commit e974b84

Browse files
committed
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. ```
1 parent 1e4bb03 commit e974b84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rustls-libssl/dist/test/deb-ubuntu-22/run-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
set -e
44
TAG="$1"
55

6-
docker run --init --interactive --publish 8443:443 "$TAG" &
7-
DOCKER_ID=$!
6+
docker run --interactive --publish 8443:443 "$TAG" &
87
sleep 2
98

109
output_got=$(curl --cacert ca.cert https://localhost:8443/)
1110

12-
kill "$DOCKER_ID"
11+
docker stop "$(docker ps --quiet)"
12+
1313
diff --unified --report-identical-files <(echo "hello world") <(echo "$output_got")

0 commit comments

Comments
 (0)