浏览代码

Merge pull request #7367 from infosiftr/entrypoint

Standardize test curl image; update to buster
Tianon Gravi 5 年之前
父节点
当前提交
98ae9ef3b1

+ 8 - 3
test/tests/cassandra-basics/run.sh

@@ -8,7 +8,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-# Use the image being tested as our client image since it should already have curl
+# Use the image being tested as our client image
 clientImage="$image"
 clientImage="$image"
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
@@ -27,7 +27,11 @@ trap "docker rm -vf $cid > /dev/null" EXIT
 trap "( set -x; docker logs --tail=20 $cid )" ERR
 trap "( set -x; docker logs --tail=20 $cid )" ERR
 
 
 _status() {
 _status() {
-	docker run --rm --link "$cid":cassandra "$clientImage" nodetool -h cassandra status
+	docker run --rm \
+		--link "$cid":cassandra \
+		--entrypoint nodetool \
+		"$clientImage" \
+		-h cassandra status
 }
 }
 
 
 # Make sure our container is up
 # Make sure our container is up
@@ -36,8 +40,9 @@ _status() {
 cqlsh() {
 cqlsh() {
 	docker run -i --rm \
 	docker run -i --rm \
 		--link "$cid":cassandra \
 		--link "$cid":cassandra \
+		--entrypoint cqlsh \
 		"$clientImage" \
 		"$clientImage" \
-		cqlsh -u cassandra -p cassandra "$@" cassandra
+		-u cassandra -p cassandra "$@" cassandra
 }
 }
 
 
 # Make sure our container is listening
 # Make sure our container is listening

+ 6 - 6
test/tests/convertigo-hello-world/run.sh

@@ -3,13 +3,11 @@ set -eo pipefail
 
 
 dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
-image="$1"
-
-# since we have curl in the convertigo image, we'll use that
-clientImage="$1"
-
 serverImage="$1"
 serverImage="$1"
 
 
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
+
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 cid="$(docker run -d "$serverImage")"
 cid="$(docker run -d "$serverImage")"
 trap "docker rm -vf $cid > /dev/null" EXIT
 trap "docker rm -vf $cid > /dev/null" EXIT
@@ -18,7 +16,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":convertigo "$clientImage" \
+	docker run --rm \
+		--link "$cid":convertigo \
+		"$clientImage" \
 		curl -s "$@" "http://convertigo:28080/$url"
 		curl -s "$@" "http://convertigo:28080/$url"
 }
 }
 
 

+ 4 - 3
test/tests/elasticsearch-basics/run.sh

@@ -8,8 +8,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-# our image may not have "curl" (Alpine variants, for example)
-clientImage='buildpack-deps:stretch-curl'
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 # (explicitly setting a low memory limit since the image defaults to 2GB)
 # (explicitly setting a low memory limit since the image defaults to 2GB)
@@ -27,7 +27,8 @@ _request() {
 	# https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
 	# https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
 	docker run --rm --link "$cid":es \
 	docker run --rm --link "$cid":es \
 		-e DOCKER_FIX='                                        ' \
 		-e DOCKER_FIX='                                        ' \
-		"$clientImage" curl -fs -X"$method" "$@" "http://es:9200/$url"
+		"$clientImage" \
+		curl -fs -X"$method" "$@" "http://es:9200/$url"
 }
 }
 
 
 _trimmed() {
 _trimmed() {

+ 4 - 2
test/tests/ghost-basics/run.sh

@@ -6,7 +6,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 serverImage="$1"
 serverImage="$1"
 
 
 # Use a client image with curl for testing
 # Use a client image with curl for testing
-clientImage='buildpack-deps:stretch-curl'
+clientImage='buildpack-deps:buster-curl'
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 cid="$(docker run -d "$serverImage")"
 cid="$(docker run -d "$serverImage")"
@@ -19,7 +19,9 @@ _request() {
 	local url="${1}"
 	local url="${1}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":ghost "$clientImage" \
+	docker run --rm \
+		--link "$cid":ghost \
+		"$clientImage" \
 		curl -fs -X"$method" "$@" "http://ghost:2368/$url"
 		curl -fs -X"$method" "$@" "http://ghost:2368/$url"
 }
 }
 
 

+ 4 - 2
test/tests/haproxy-basics/run.sh

@@ -8,7 +8,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-clientImage='buildpack-deps:stretch-curl'
+clientImage='buildpack-deps:buster-curl'
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 serverImage="$("$dir/../image-name.sh" librarytest/haproxy-basics "$image")"
 serverImage="$("$dir/../image-name.sh" librarytest/haproxy-basics "$image")"
@@ -35,7 +35,9 @@ _request() {
 		false
 		false
 	fi
 	fi
 
 
-	docker run --rm --link "$cid":haproxy "$clientImage" \
+	docker run --rm \
+		--link "$cid":haproxy \
+		"$clientImage" \
 		curl -fsSL -X"$method" --connect-to '::haproxy:' "$@" "$proto://example.com/$url"
 		curl -fsSL -X"$method" --connect-to '::haproxy:' "$@" "$proto://example.com/$url"
 }
 }
 
 

+ 4 - 2
test/tests/jetty-hello-web/run.sh

@@ -9,7 +9,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 image="$1"
 image="$1"
 
 
 # Use a client image with curl for testing
 # Use a client image with curl for testing
-clientImage='buildpack-deps:stretch-curl'
+clientImage='buildpack-deps:buster-curl'
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 serverImage="$("$dir/../image-name.sh" librarytest/jetty-hello-web "$image")"
 serverImage="$("$dir/../image-name.sh" librarytest/jetty-hello-web "$image")"
@@ -27,7 +27,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":jetty "$clientImage" \
+	docker run --rm \
+		--link "$cid":jetty \
+		"$clientImage" \
 		curl -fs -X"$method" "$@" "http://jetty:8080/$url"
 		curl -fs -X"$method" "$@" "http://jetty:8080/$url"
 }
 }
 
 

+ 6 - 4
test/tests/logstash-basics/run.sh

@@ -8,8 +8,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-# our image may not have "curl" (Alpine variants, for example)
-clientImage='buildpack-deps:stretch-curl'
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
 
 
 # input via HTTP (default port 0.0.0.0:8080)
 # input via HTTP (default port 0.0.0.0:8080)
 # output via stdout, newline-delimited nothing-but-the-message
 # output via stdout, newline-delimited nothing-but-the-message
@@ -33,9 +33,11 @@ trap "docker rm -vf $cid > /dev/null" EXIT
 
 
 _request() {
 _request() {
 	# https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
 	# https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
-	docker run --rm --link "$cid":logstash \
+	docker run --rm \
+		--link "$cid":logstash \
 		-e DOCKER_FIX='                                        ' \
 		-e DOCKER_FIX='                                        ' \
-		"$clientImage" curl -fs "$@" "http://logstash:8080"
+		"$clientImage" \
+		curl -fs "$@" "http://logstash:8080"
 }
 }
 
 
 _trimmed() {
 _trimmed() {

+ 2 - 1
test/tests/memcached-basics/run.sh

@@ -23,7 +23,8 @@ memcached-command() {
 	} \
 	} \
 		| docker run --rm -i \
 		| docker run --rm -i \
 			--link "$cname":memcached \
 			--link "$cname":memcached \
-			"$clientImage" nc memcached 11211 \
+			"$clientImage" \
+			nc memcached 11211 \
 		| tr -d '\r'
 		| tr -d '\r'
 }
 }
 
 

+ 7 - 3
test/tests/mongo-basics/run.sh

@@ -13,7 +13,7 @@ if docker info --format '{{ join .SecurityOptions "\n" }}' 2>/dev/null |tac|tac|
 	# make container with jq since it is not guaranteed on the host
 	# make container with jq since it is not guaranteed on the host
 	jqImage='librarytest/mongo-basics-jq:alpine'
 	jqImage='librarytest/mongo-basics-jq:alpine'
 	docker build -t "$jqImage" - > /dev/null <<-'EOF'
 	docker build -t "$jqImage" - > /dev/null <<-'EOF'
-		FROM alpine:3.9
+		FROM alpine:3.11
 
 
 		RUN apk add --no-cache jq
 		RUN apk add --no-cache jq
 
 
@@ -75,7 +75,7 @@ fi
 if [[ "$testName" == *tls* ]]; then
 if [[ "$testName" == *tls* ]]; then
 	tlsImage="$("$testDir/../image-name.sh" librarytest/mongo-tls "$image")"
 	tlsImage="$("$testDir/../image-name.sh" librarytest/mongo-tls "$image")"
 	"$testDir/../docker-build.sh" "$testDir" "$tlsImage" <<-EOD
 	"$testDir/../docker-build.sh" "$testDir" "$tlsImage" <<-EOD
-		FROM alpine:3.10 AS certs
+		FROM alpine:3.11 AS certs
 		RUN apk add --no-cache openssl
 		RUN apk add --no-cache openssl
 		RUN set -eux; \
 		RUN set -eux; \
 			mkdir /certs; \
 			mkdir /certs; \
@@ -129,7 +129,11 @@ cid="$(docker_run_seccomp "${mongodRunArgs[@]}" "$image" "${mongodCmdArgs[@]}")"
 trap "docker rm -vf $cid > /dev/null" EXIT
 trap "docker rm -vf $cid > /dev/null" EXIT
 
 
 mongo() {
 mongo() {
-	docker_run_seccomp --rm -i --link "$cname":mongo "$image" mongo "${mongoArgs[@]}" "$@"
+	docker_run_seccomp --rm -i \
+		--link "$cname":mongo \
+		--entrypoint mongo \
+		"$image" \
+		"${mongoArgs[@]}" "$@"
 }
 }
 
 
 mongo_eval() {
 mongo_eval() {

+ 6 - 3
test/tests/nextcloud-apache-run/run.sh

@@ -3,10 +3,11 @@ set -eo pipefail
 
 
 dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
-# since we have curl in the php image, we'll use that
-clientImage="$1"
 serverImage="$1"
 serverImage="$1"
 
 
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
+
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 cid="$(docker run -d "$serverImage")"
 cid="$(docker run -d "$serverImage")"
 trap "docker rm -vf $cid > /dev/null" EXIT
 trap "docker rm -vf $cid > /dev/null" EXIT
@@ -18,7 +19,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":apache "$clientImage" \
+	docker run --rm \
+		--link "$cid":apache \
+		"$clientImage" \
 		curl -fsL -X"$method" "$@" "http://apache/$url"
 		curl -fsL -X"$method" "$@" "http://apache/$url"
 }
 }
 
 

+ 2 - 1
test/tests/nextcloud-fpm-run/run.sh

@@ -29,7 +29,8 @@ fcgi-request() {
 		url="${url%%\?*}"
 		url="${url%%\?*}"
 	fi
 	fi
 
 
-	docker run --rm -i --link "$cid":fpm \
+	docker run --rm -i \
+		--link "$cid":fpm \
 		-e REQUEST_METHOD="$method" \
 		-e REQUEST_METHOD="$method" \
 		-e SCRIPT_NAME="$url" \
 		-e SCRIPT_NAME="$url" \
 		-e SCRIPT_FILENAME=/var/www/html/"${url#/}" \
 		-e SCRIPT_FILENAME=/var/www/html/"${url#/}" \

+ 1 - 0
test/tests/nuxeo-conf/run.sh

@@ -6,6 +6,7 @@ image="$1"
 export NUXEO_DEV_MODE='true'
 export NUXEO_DEV_MODE='true'
 export NUXEO_AUTOMATION_TRACE='true'
 export NUXEO_AUTOMATION_TRACE='true'
 
 
+# not using '--entrypoint nuxeoctl', since regular entrypoint does setup for nuxeoctl
 docker run --rm -i \
 docker run --rm -i \
 	-e NUXEO_DEV_MODE \
 	-e NUXEO_DEV_MODE \
 	-e NUXEO_AUTOMATION_TRACE \
 	-e NUXEO_AUTOMATION_TRACE \

+ 6 - 4
test/tests/open-liberty-hello-world/run.sh

@@ -5,8 +5,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-# Use the alpine image since it is small and has wget in it that we can use
-clientImage="alpine:3.9"
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
 
 
 serverImage="$1"
 serverImage="$1"
 
 
@@ -18,8 +18,10 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":open-liberty "$clientImage" \
-		wget -q -O - "$@" "http://open-liberty:9080/$url"
+	docker run --rm \
+		--link "$cid":open-liberty \
+		"$clientImage" \
+		curl -fsSL "$@" "http://open-liberty:9080/$url"
 }
 }
 
 
 # Make sure that Open Liberty is listening
 # Make sure that Open Liberty is listening

+ 5 - 3
test/tests/php-apache-hello-web/run.sh

@@ -5,8 +5,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-# since we have curl in the php image, we'll use that
-clientImage="$1"
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
 
 
 serverImage="$("$dir/../image-name.sh" librarytest/php-apache-hello-web "$image")"
 serverImage="$("$dir/../image-name.sh" librarytest/php-apache-hello-web "$image")"
 "$dir/../docker-build.sh" "$dir" "$serverImage" <<EOD
 "$dir/../docker-build.sh" "$dir" "$serverImage" <<EOD
@@ -25,7 +25,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":apache "$clientImage" \
+	docker run --rm \
+		--link "$cid":apache \
+		"$clientImage" \
 		curl -fs -X"$method" "$@" "http://apache/$url"
 		curl -fs -X"$method" "$@" "http://apache/$url"
 }
 }
 
 

+ 1 - 0
test/tests/plone-addons/run.sh

@@ -1,6 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 set -eo pipefail
 set -eo pipefail
 
 
+# not using '--entrypoint', since regular entrypoint sets up config
 docker run -i --rm \
 docker run -i --rm \
 	-e PLONE_DEVELOP=src/eea.facetednavigation \
 	-e PLONE_DEVELOP=src/eea.facetednavigation \
 	-e PLONE_ADDONS=eea.facetednavigation \
 	-e PLONE_ADDONS=eea.facetednavigation \

+ 1 - 0
test/tests/plone-cors/run.sh

@@ -1,6 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 set -eo pipefail
 set -eo pipefail
 
 
+# not using '--entrypoint', since regular entrypoint sets up config
 docker run -i --rm \
 docker run -i --rm \
 	-e CORS_ALLOW_ORIGIN="http://example.com:4300,http://example.com:5300" \
 	-e CORS_ALLOW_ORIGIN="http://example.com:4300,http://example.com:5300" \
 	-e CORS_ALLOW_METHODS="DELETE,PUT" \
 	-e CORS_ALLOW_METHODS="DELETE,PUT" \

+ 1 - 0
test/tests/plone-versions/run.sh

@@ -1,6 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 set -eo pipefail
 set -eo pipefail
 
 
+# not using '--entrypoint', since regular entrypoint sets up config
 docker run -i --rm \
 docker run -i --rm \
 	-e PLONE_DEVELOP=src/eea.facetednavigation \
 	-e PLONE_DEVELOP=src/eea.facetednavigation \
 	-e PLONE_ADDONS=eea.facetednavigation \
 	-e PLONE_ADDONS=eea.facetednavigation \

+ 4 - 1
test/tests/rabbitmq-basics/run.sh

@@ -19,7 +19,10 @@ cid="$(docker run -d --name "$cname" "$serverImage")"
 trap "docker rm -vf $cid > /dev/null" EXIT
 trap "docker rm -vf $cid > /dev/null" EXIT
 
 
 client() {
 client() {
-	docker run -i --rm --link "$cname":rabbitmq "$clientImage" "$@"
+	docker run -i --rm \
+		--link "$cname":rabbitmq \
+		"$clientImage" \
+		"$@"
 }
 }
 
 
 . "$dir/../../retry.sh" 'client testconn.py'
 . "$dir/../../retry.sh" 'client testconn.py'

+ 14 - 4
test/tests/rabbitmq-tls/run.sh

@@ -27,7 +27,7 @@ EOD
 
 
 testImage="$("$dir/../image-name.sh" librarytest/rabbitmq-tls-test "$1")"
 testImage="$("$dir/../image-name.sh" librarytest/rabbitmq-tls-test "$1")"
 "$dir/../docker-build.sh" "$dir" "$testImage" <<'EOD'
 "$dir/../docker-build.sh" "$dir" "$testImage" <<'EOD'
-FROM alpine:3.10
+FROM alpine:3.11
 RUN apk add --no-cache bash coreutils drill openssl procps
 RUN apk add --no-cache bash coreutils drill openssl procps
 # https://github.com/drwetter/testssl.sh/releases
 # https://github.com/drwetter/testssl.sh/releases
 ENV TESTSSL_VERSION 2.9.5-8
 ENV TESTSSL_VERSION 2.9.5-8
@@ -46,15 +46,25 @@ cid="$(docker run -d --name "$cname" --hostname "$cname" -e RABBITMQ_ERLANG_COOK
 trap "docker rm -vf $cid > /dev/null" EXIT
 trap "docker rm -vf $cid > /dev/null" EXIT
 
 
 testssl() {
 testssl() {
-	docker run -i --rm --link "$cname" "$testImage" \
+	docker run -i --rm \
+		--link "$cname" \
+		"$testImage" \
 		testssl.sh --quiet --color 0 "$@" "$cname:5671"
 		testssl.sh --quiet --color 0 "$@" "$cname:5671"
 }
 }
 rabbitmqctl() {
 rabbitmqctl() {
-	docker run -i --rm --link "$cname" -e RABBITMQ_ERLANG_COOKIE "$serverImage" \
+	# not using '--entrypoint', since regular entrypoint does needed env setup
+	docker run -i --rm \
+		--link "$cname" \
+		-e RABBITMQ_ERLANG_COOKIE \
+		"$serverImage" \
 		rabbitmqctl --node "rabbit@$cname" "$@"
 		rabbitmqctl --node "rabbit@$cname" "$@"
 }
 }
 rabbitmq-diagnostics() {
 rabbitmq-diagnostics() {
-	docker run -i --rm --link "$cname" -e RABBITMQ_ERLANG_COOKIE "$serverImage" \
+	# not using '--entrypoint', since regular entrypoint does needed env setup
+	docker run -i --rm \
+		--link "$cname" \
+		-e RABBITMQ_ERLANG_COOKIE \
+		"$serverImage" \
 		rabbitmq-diagnostics --node "rabbit@$cname" "$@"
 		rabbitmq-diagnostics --node "rabbit@$cname" "$@"
 }
 }
 
 

+ 4 - 2
test/tests/rapidoid-hello-world/run.sh

@@ -9,7 +9,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 image="$1"
 image="$1"
 
 
 # Use a client image with curl for testing
 # Use a client image with curl for testing
-clientImage='buildpack-deps:stretch-curl'
+clientImage='buildpack-deps:buster-curl'
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 serverImage="$("$dir/../image-name.sh" librarytest/rapidoid-hello-web "$image")"
 serverImage="$("$dir/../image-name.sh" librarytest/rapidoid-hello-web "$image")"
@@ -31,7 +31,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":rapidoid "$clientImage" \
+	docker run --rm \
+		--link "$cid":rapidoid \
+		"$clientImage" \
 		curl -fs -X"$method" "$@" "http://rapidoid:8888/$url"
 		curl -fs -X"$method" "$@" "http://rapidoid:8888/$url"
 }
 }
 
 

+ 9 - 7
test/tests/rapidoid-load-balancer/run.sh

@@ -9,7 +9,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 image="$1"
 image="$1"
 
 
 # Use a client image with curl for testing
 # Use a client image with curl for testing
-clientImage='buildpack-deps:stretch-curl'
+clientImage='buildpack-deps:buster-curl'
 
 
 app1id="$(docker run -d "$image" rapidoid.port=80 id=app1 app.services=ping,status)"
 app1id="$(docker run -d "$image" rapidoid.port=80 id=app1 app.services=ping,status)"
 app2id="$(docker run -d "$image" rapidoid.port=80 id=app2 app.services=ping,status)"
 app2id="$(docker run -d "$image" rapidoid.port=80 id=app2 app.services=ping,status)"
@@ -19,7 +19,7 @@ proxyid="$(docker run -d --link "$app1id":app1 --link "$app2id":app2 "$image" ra
 trap "docker rm -vf $proxyid $app1id $app2id > /dev/null" EXIT
 trap "docker rm -vf $proxyid $app1id $app2id > /dev/null" EXIT
 
 
 _request() {
 _request() {
-    local cid="$1"
+	local cid="$1"
 	shift
 	shift
 
 
 	local method="$1"
 	local method="$1"
@@ -28,18 +28,20 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":rapidoid "$clientImage" \
+	docker run --rm \
+		--link "$cid":rapidoid \
+		"$clientImage" \
 		curl -fs -X"$method" "$@" "http://rapidoid/$url"
 		curl -fs -X"$method" "$@" "http://rapidoid/$url"
 }
 }
 
 
 # Make sure all Rapidoid servers are listening on port 80
 # Make sure all Rapidoid servers are listening on port 80
 for cid in $app1id $app2id $proxyid; do
 for cid in $app1id $app2id $proxyid; do
-    . "$dir/../../retry.sh" --tries 40 --sleep 0.25 '[ "$(_request '$cid' GET /rapidoid/ping --output /dev/null || echo $?)" != 7 ]'
+	. "$dir/../../retry.sh" --tries 40 --sleep 0.25 '[ "$(_request '$cid' GET /rapidoid/ping --output /dev/null || echo $?)" != 7 ]'
 done
 done
 
 
 # Make sure that the round-robin load balancing works properly
 # Make sure that the round-robin load balancing works properly
 for n in `seq 1 5`; do
 for n in `seq 1 5`; do
-    for i in 1 2; do
-        [[ "$(_request $cid GET "/rapidoid/status")" == *"\"app$i\""* ]]
-    done
+	for i in 1 2; do
+		[[ "$(_request $cid GET "/rapidoid/status")" == *"\"app$i\""* ]]
+	done
 done
 done

+ 4 - 2
test/tests/redmine-basics/run.sh

@@ -6,7 +6,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 serverImage="$1"
 serverImage="$1"
 
 
 # Use a client image with curl for testing
 # Use a client image with curl for testing
-clientImage='buildpack-deps:stretch-curl'
+clientImage='buildpack-deps:buster-curl'
 
 
 # Create an instance of the container-under-test
 # Create an instance of the container-under-test
 cid="$(docker run -d "$serverImage")"
 cid="$(docker run -d "$serverImage")"
@@ -19,7 +19,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":redmine "$clientImage" \
+	docker run --rm \
+		--link "$cid":redmine \
+		"$clientImage" \
 		curl -fs -X"$method" "$@" "http://redmine:3000/$url"
 		curl -fs -X"$method" "$@" "http://redmine:3000/$url"
 }
 }
 
 

+ 7 - 1
test/tests/silverpeas-basics/run.sh

@@ -5,6 +5,9 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
+
 cname="silverpeas-container-$RANDOM-$RANDOM"
 cname="silverpeas-container-$RANDOM-$RANDOM"
 # when running the first time, a silverpeas process is spawn before starting Silverpeas
 # when running the first time, a silverpeas process is spawn before starting Silverpeas
 # (this configuration process can take some time)
 # (this configuration process can take some time)
@@ -19,7 +22,10 @@ cid="$(
 trap "docker rm -vf $cid > /dev/null" EXIT
 trap "docker rm -vf $cid > /dev/null" EXIT
 
 
 check_running() {
 check_running() {
-	docker run --rm --link "$cid":silverpeas "$image" wget http://silverpeas:8000/silverpeas -O /dev/null
+	docker run --rm \
+		--link "$cid":silverpeas \
+		"$clientImage" \
+		curl -fs http://silverpeas:8000/silverpeas > /dev/null
 }
 }
 
 
 . "$dir/../../retry.sh" --tries 20 --sleep 5 'check_running'
 . "$dir/../../retry.sh" --tries 20 --sleep 5 'check_running'

+ 6 - 4
test/tests/tomcat-hello-world/run.sh

@@ -5,8 +5,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
 image="$1"
 image="$1"
 
 
-# since the "slim" tomcat variants don't have wget, we'll use buildpack-deps
-clientImage='buildpack-deps:stretch-curl'
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
 
 
 serverImage="$("$dir/../image-name.sh" librarytest/tomcat-hello-world "$image")"
 serverImage="$("$dir/../image-name.sh" librarytest/tomcat-hello-world "$image")"
 "$dir/../docker-build.sh" "$dir" "$serverImage" <<EOD
 "$dir/../docker-build.sh" "$dir" "$serverImage" <<EOD
@@ -22,8 +22,10 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":tomcat "$clientImage" \
-		wget -q -O - "$@" "http://tomcat:8080/$url"
+	docker run --rm \
+		--link "$cid":tomcat \
+		"$clientImage" \
+		curl -fsSL "$@" "http://tomcat:8080/$url"
 }
 }
 
 
 # Make sure that Tomcat is listening
 # Make sure that Tomcat is listening

+ 5 - 3
test/tests/wordpress-apache-run/run.sh

@@ -3,8 +3,8 @@ set -eo pipefail
 
 
 dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
 
 
-# since we have curl in the php image, we'll use that
-clientImage="$1"
+# Use a client image with curl for testing
+clientImage='buildpack-deps:buster-curl'
 
 
 mysqlImage='mysql:5.7'
 mysqlImage='mysql:5.7'
 serverImage="$1"
 serverImage="$1"
@@ -22,7 +22,9 @@ _request() {
 	local url="${1#/}"
 	local url="${1#/}"
 	shift
 	shift
 
 
-	docker run --rm --link "$cid":apache "$clientImage" \
+	docker run --rm \
+		--link "$cid":apache \
+		"$clientImage" \
 		curl -fsL -X"$method" "$@" "http://apache/$url"
 		curl -fsL -X"$method" "$@" "http://apache/$url"
 }
 }