File tree Expand file tree Collapse file tree 25 files changed +121
-61
lines changed
Expand file tree Collapse file tree 25 files changed +121
-61
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
88
99image=" $1 "
1010
11- # Use the image being tested as our client image since it should already have curl
11+ # Use the image being tested as our client image
1212clientImage=" $image "
1313
1414# Create an instance of the container-under-test
@@ -27,7 +27,11 @@ trap "docker rm -vf $cid > /dev/null" EXIT
2727trap " ( set -x; docker logs --tail=20 $cid )" ERR
2828
2929_status () {
30- docker run --rm --link " $cid " :cassandra " $clientImage " nodetool -h cassandra status
30+ docker run --rm \
31+ --link " $cid " :cassandra \
32+ --entrypoint nodetool \
33+ " $clientImage " \
34+ -h cassandra status
3135}
3236
3337# Make sure our container is up
@@ -36,8 +40,9 @@ _status() {
3640cqlsh () {
3741 docker run -i --rm \
3842 --link " $cid " :cassandra \
43+ --entrypoint cqlsh \
3944 " $clientImage " \
40- cqlsh -u cassandra -p cassandra " $@ " cassandra
45+ -u cassandra -p cassandra " $@ " cassandra
4146}
4247
4348# Make sure our container is listening
Original file line number Diff line number Diff line change @@ -3,13 +3,11 @@ set -eo pipefail
33
44dir=" $( dirname " $( readlink -f " $BASH_SOURCE " ) " ) "
55
6- image=" $1 "
7-
8- # since we have curl in the convertigo image, we'll use that
9- clientImage=" $1 "
10-
116serverImage=" $1 "
127
8+ # Use a client image with curl for testing
9+ clientImage=' buildpack-deps:buster-curl'
10+
1311# Create an instance of the container-under-test
1412cid=" $( docker run -d " $serverImage " ) "
1513trap " docker rm -vf $cid > /dev/null" EXIT
@@ -18,7 +16,9 @@ _request() {
1816 local url=" ${1#/ } "
1917 shift
2018
21- docker run --rm --link " $cid " :convertigo " $clientImage " \
19+ docker run --rm \
20+ --link " $cid " :convertigo \
21+ " $clientImage " \
2222 curl -s " $@ " " http://convertigo:28080/$url "
2323}
2424
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
88
99image=" $1 "
1010
11- # our image may not have " curl" (Alpine variants, for example)
12- clientImage=' buildpack-deps:stretch -curl'
11+ # Use a client image with curl for testing
12+ clientImage=' buildpack-deps:buster -curl'
1313
1414# Create an instance of the container-under-test
1515# (explicitly setting a low memory limit since the image defaults to 2GB)
@@ -27,7 +27,8 @@ _request() {
2727 # https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
2828 docker run --rm --link " $cid " :es \
2929 -e DOCKER_FIX=' ' \
30- " $clientImage " curl -fs -X" $method " " $@ " " http://es:9200/$url "
30+ " $clientImage " \
31+ curl -fs -X" $method " " $@ " " http://es:9200/$url "
3132}
3233
3334_trimmed () {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
66serverImage=" $1 "
77
88# Use a client image with curl for testing
9- clientImage=' buildpack-deps:stretch -curl'
9+ clientImage=' buildpack-deps:buster -curl'
1010
1111# Create an instance of the container-under-test
1212cid=" $( docker run -d " $serverImage " ) "
@@ -19,7 +19,9 @@ _request() {
1919 local url=" ${1} "
2020 shift
2121
22- docker run --rm --link " $cid " :ghost " $clientImage " \
22+ docker run --rm \
23+ --link " $cid " :ghost \
24+ " $clientImage " \
2325 curl -fs -X" $method " " $@ " " http://ghost:2368/$url "
2426}
2527
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
88
99image=" $1 "
1010
11- clientImage=' buildpack-deps:stretch -curl'
11+ clientImage=' buildpack-deps:buster -curl'
1212
1313# Create an instance of the container-under-test
1414serverImage=" $( " $dir /../image-name.sh" librarytest/haproxy-basics " $image " ) "
@@ -35,7 +35,9 @@ _request() {
3535 false
3636 fi
3737
38- docker run --rm --link " $cid " :haproxy " $clientImage " \
38+ docker run --rm \
39+ --link " $cid " :haproxy \
40+ " $clientImage " \
3941 curl -fsSL -X" $method " --connect-to ' ::haproxy:' " $@ " " $proto ://example.com/$url "
4042}
4143
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
99image=" $1 "
1010
1111# Use a client image with curl for testing
12- clientImage=' buildpack-deps:stretch -curl'
12+ clientImage=' buildpack-deps:buster -curl'
1313
1414# Create an instance of the container-under-test
1515serverImage=" $( " $dir /../image-name.sh" librarytest/jetty-hello-web " $image " ) "
@@ -27,7 +27,9 @@ _request() {
2727 local url=" ${1#/ } "
2828 shift
2929
30- docker run --rm --link " $cid " :jetty " $clientImage " \
30+ docker run --rm \
31+ --link " $cid " :jetty \
32+ " $clientImage " \
3133 curl -fs -X" $method " " $@ " " http://jetty:8080/$url "
3234}
3335
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
88
99image=" $1 "
1010
11- # our image may not have " curl" (Alpine variants, for example)
12- clientImage=' buildpack-deps:stretch -curl'
11+ # Use a client image with curl for testing
12+ clientImage=' buildpack-deps:buster -curl'
1313
1414# input via HTTP (default port 0.0.0.0:8080)
1515# output via stdout, newline-delimited nothing-but-the-message
@@ -33,9 +33,11 @@ trap "docker rm -vf $cid > /dev/null" EXIT
3333
3434_request () {
3535 # https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
36- docker run --rm --link " $cid " :logstash \
36+ docker run --rm \
37+ --link " $cid " :logstash \
3738 -e DOCKER_FIX=' ' \
38- " $clientImage " curl -fs " $@ " " http://logstash:8080"
39+ " $clientImage " \
40+ curl -fs " $@ " " http://logstash:8080"
3941}
4042
4143_trimmed () {
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ memcached-command() {
2323 } \
2424 | docker run --rm -i \
2525 --link " $cname " :memcached \
26- " $clientImage " nc memcached 11211 \
26+ " $clientImage " \
27+ nc memcached 11211 \
2728 | tr -d ' \r'
2829}
2930
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ if docker info --format '{{ join .SecurityOptions "\n" }}' 2>/dev/null |tac|tac|
1313 # make container with jq since it is not guaranteed on the host
1414 jqImage=' librarytest/mongo-basics-jq:alpine'
1515 docker build -t " $jqImage " - > /dev/null << -'EOF '
16- FROM alpine:3.9
16+ FROM alpine:3.11
1717
1818 RUN apk add --no-cache jq
1919
7575if [[ " $testName " == * tls* ]]; then
7676 tlsImage=" $( " $testDir /../image-name.sh" librarytest/mongo-tls " $image " ) "
7777 " $testDir /../docker-build.sh" " $testDir " " $tlsImage " << -EOD
78- FROM alpine:3.10 AS certs
78+ FROM alpine:3.11 AS certs
7979 RUN apk add --no-cache openssl
8080 RUN set -eux; \
8181 mkdir /certs; \
@@ -129,7 +129,11 @@ cid="$(docker_run_seccomp "${mongodRunArgs[@]}" "$image" "${mongodCmdArgs[@]}")"
129129trap " docker rm -vf $cid > /dev/null" EXIT
130130
131131mongo () {
132- docker_run_seccomp --rm -i --link " $cname " :mongo " $image " mongo " ${mongoArgs[@]} " " $@ "
132+ docker_run_seccomp --rm -i \
133+ --link " $cname " :mongo \
134+ --entrypoint mongo \
135+ " $image " \
136+ " ${mongoArgs[@]} " " $@ "
133137}
134138
135139mongo_eval () {
Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ set -eo pipefail
33
44dir=" $( dirname " $( readlink -f " $BASH_SOURCE " ) " ) "
55
6- # since we have curl in the php image, we'll use that
7- clientImage=" $1 "
86serverImage=" $1 "
97
8+ # Use a client image with curl for testing
9+ clientImage=' buildpack-deps:buster-curl'
10+
1011# Create an instance of the container-under-test
1112cid=" $( docker run -d " $serverImage " ) "
1213trap " docker rm -vf $cid > /dev/null" EXIT
@@ -18,7 +19,9 @@ _request() {
1819 local url=" ${1#/ } "
1920 shift
2021
21- docker run --rm --link " $cid " :apache " $clientImage " \
22+ docker run --rm \
23+ --link " $cid " :apache \
24+ " $clientImage " \
2225 curl -fsL -X" $method " " $@ " " http://apache/$url "
2326}
2427
You can’t perform that action at this time.
0 commit comments