File tree 25 files changed +121
-61
lines changed
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")")"
8
8
9
9
image=" $1 "
10
10
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
12
12
clientImage=" $image "
13
13
14
14
# Create an instance of the container-under-test
@@ -27,7 +27,11 @@ trap "docker rm -vf $cid > /dev/null" EXIT
27
27
trap " ( set -x; docker logs --tail=20 $cid )" ERR
28
28
29
29
_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
31
35
}
32
36
33
37
# Make sure our container is up
@@ -36,8 +40,9 @@ _status() {
36
40
cqlsh () {
37
41
docker run -i --rm \
38
42
--link " $cid " :cassandra \
43
+ --entrypoint cqlsh \
39
44
" $clientImage " \
40
- cqlsh -u cassandra -p cassandra " $@ " cassandra
45
+ -u cassandra -p cassandra " $@ " cassandra
41
46
}
42
47
43
48
# Make sure our container is listening
Original file line number Diff line number Diff line change @@ -3,13 +3,11 @@ set -eo pipefail
3
3
4
4
dir=" $( dirname " $( readlink -f " $BASH_SOURCE " ) " ) "
5
5
6
- image=" $1 "
7
-
8
- # since we have curl in the convertigo image, we'll use that
9
- clientImage=" $1 "
10
-
11
6
serverImage=" $1 "
12
7
8
+ # Use a client image with curl for testing
9
+ clientImage=' buildpack-deps:buster-curl'
10
+
13
11
# Create an instance of the container-under-test
14
12
cid=" $( docker run -d " $serverImage " ) "
15
13
trap " docker rm -vf $cid > /dev/null" EXIT
@@ -18,7 +16,9 @@ _request() {
18
16
local url=" ${1#/ } "
19
17
shift
20
18
21
- docker run --rm --link " $cid " :convertigo " $clientImage " \
19
+ docker run --rm \
20
+ --link " $cid " :convertigo \
21
+ " $clientImage " \
22
22
curl -s " $@ " " http://convertigo:28080/$url "
23
23
}
24
24
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
8
8
9
9
image=" $1 "
10
10
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'
13
13
14
14
# Create an instance of the container-under-test
15
15
# (explicitly setting a low memory limit since the image defaults to 2GB)
@@ -27,7 +27,8 @@ _request() {
27
27
# https://github.com/docker/docker/issues/14203#issuecomment-129865960 (DOCKER_FIX)
28
28
docker run --rm --link " $cid " :es \
29
29
-e DOCKER_FIX=' ' \
30
- " $clientImage " curl -fs -X" $method " " $@ " " http://es:9200/$url "
30
+ " $clientImage " \
31
+ curl -fs -X" $method " " $@ " " http://es:9200/$url "
31
32
}
32
33
33
34
_trimmed () {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
6
6
serverImage=" $1 "
7
7
8
8
# Use a client image with curl for testing
9
- clientImage=' buildpack-deps:stretch -curl'
9
+ clientImage=' buildpack-deps:buster -curl'
10
10
11
11
# Create an instance of the container-under-test
12
12
cid=" $( docker run -d " $serverImage " ) "
@@ -19,7 +19,9 @@ _request() {
19
19
local url=" ${1} "
20
20
shift
21
21
22
- docker run --rm --link " $cid " :ghost " $clientImage " \
22
+ docker run --rm \
23
+ --link " $cid " :ghost \
24
+ " $clientImage " \
23
25
curl -fs -X" $method " " $@ " " http://ghost:2368/$url "
24
26
}
25
27
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
8
8
9
9
image=" $1 "
10
10
11
- clientImage=' buildpack-deps:stretch -curl'
11
+ clientImage=' buildpack-deps:buster -curl'
12
12
13
13
# Create an instance of the container-under-test
14
14
serverImage=" $( " $dir /../image-name.sh" librarytest/haproxy-basics " $image " ) "
@@ -35,7 +35,9 @@ _request() {
35
35
false
36
36
fi
37
37
38
- docker run --rm --link " $cid " :haproxy " $clientImage " \
38
+ docker run --rm \
39
+ --link " $cid " :haproxy \
40
+ " $clientImage " \
39
41
curl -fsSL -X" $method " --connect-to ' ::haproxy:' " $@ " " $proto ://example.com/$url "
40
42
}
41
43
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
9
9
image=" $1 "
10
10
11
11
# Use a client image with curl for testing
12
- clientImage=' buildpack-deps:stretch -curl'
12
+ clientImage=' buildpack-deps:buster -curl'
13
13
14
14
# Create an instance of the container-under-test
15
15
serverImage=" $( " $dir /../image-name.sh" librarytest/jetty-hello-web " $image " ) "
@@ -27,7 +27,9 @@ _request() {
27
27
local url=" ${1#/ } "
28
28
shift
29
29
30
- docker run --rm --link " $cid " :jetty " $clientImage " \
30
+ docker run --rm \
31
+ --link " $cid " :jetty \
32
+ " $clientImage " \
31
33
curl -fs -X" $method " " $@ " " http://jetty:8080/$url "
32
34
}
33
35
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
8
8
9
9
image=" $1 "
10
10
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'
13
13
14
14
# input via HTTP (default port 0.0.0.0:8080)
15
15
# output via stdout, newline-delimited nothing-but-the-message
@@ -33,9 +33,11 @@ trap "docker rm -vf $cid > /dev/null" EXIT
33
33
34
34
_request () {
35
35
# 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 \
37
38
-e DOCKER_FIX=' ' \
38
- " $clientImage " curl -fs " $@ " " http://logstash:8080"
39
+ " $clientImage " \
40
+ curl -fs " $@ " " http://logstash:8080"
39
41
}
40
42
41
43
_trimmed () {
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ memcached-command() {
23
23
} \
24
24
| docker run --rm -i \
25
25
--link " $cname " :memcached \
26
- " $clientImage " nc memcached 11211 \
26
+ " $clientImage " \
27
+ nc memcached 11211 \
27
28
| tr -d ' \r'
28
29
}
29
30
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|
13
13
# make container with jq since it is not guaranteed on the host
14
14
jqImage=' librarytest/mongo-basics-jq:alpine'
15
15
docker build -t " $jqImage " - > /dev/null << -'EOF '
16
- FROM alpine:3.9
16
+ FROM alpine:3.11
17
17
18
18
RUN apk add --no-cache jq
19
19
75
75
if [[ " $testName " == * tls* ]]; then
76
76
tlsImage=" $( " $testDir /../image-name.sh" librarytest/mongo-tls " $image " ) "
77
77
" $testDir /../docker-build.sh" " $testDir " " $tlsImage " << -EOD
78
- FROM alpine:3.10 AS certs
78
+ FROM alpine:3.11 AS certs
79
79
RUN apk add --no-cache openssl
80
80
RUN set -eux; \
81
81
mkdir /certs; \
@@ -129,7 +129,11 @@ cid="$(docker_run_seccomp "${mongodRunArgs[@]}" "$image" "${mongodCmdArgs[@]}")"
129
129
trap " docker rm -vf $cid > /dev/null" EXIT
130
130
131
131
mongo () {
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[@]} " " $@ "
133
137
}
134
138
135
139
mongo_eval () {
Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ set -eo pipefail
3
3
4
4
dir=" $( dirname " $( readlink -f " $BASH_SOURCE " ) " ) "
5
5
6
- # since we have curl in the php image, we'll use that
7
- clientImage=" $1 "
8
6
serverImage=" $1 "
9
7
8
+ # Use a client image with curl for testing
9
+ clientImage=' buildpack-deps:buster-curl'
10
+
10
11
# Create an instance of the container-under-test
11
12
cid=" $( docker run -d " $serverImage " ) "
12
13
trap " docker rm -vf $cid > /dev/null" EXIT
@@ -18,7 +19,9 @@ _request() {
18
19
local url=" ${1#/ } "
19
20
shift
20
21
21
- docker run --rm --link " $cid " :apache " $clientImage " \
22
+ docker run --rm \
23
+ --link " $cid " :apache \
24
+ " $clientImage " \
22
25
curl -fsL -X" $method " " $@ " " http://apache/$url "
23
26
}
24
27
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ fcgi-request() {
29
29
url=" ${url%% \? * } "
30
30
fi
31
31
32
- docker run --rm -i --link " $cid " :fpm \
32
+ docker run --rm -i \
33
+ --link " $cid " :fpm \
33
34
-e REQUEST_METHOD=" $method " \
34
35
-e SCRIPT_NAME=" $url " \
35
36
-e SCRIPT_FILENAME=/var/www/html/" ${url#/ } " \
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ image="$1"
6
6
export NUXEO_DEV_MODE=' true'
7
7
export NUXEO_AUTOMATION_TRACE=' true'
8
8
9
+ # not using '--entrypoint nuxeoctl', since regular entrypoint does setup for nuxeoctl
9
10
docker run --rm -i \
10
11
-e NUXEO_DEV_MODE \
11
12
-e NUXEO_AUTOMATION_TRACE \
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
5
5
6
6
image=" $1 "
7
7
8
- # Use the alpine image since it is small and has wget in it that we can use
9
- clientImage=" alpine:3.9 "
8
+ # Use a client image with curl for testing
9
+ clientImage=' buildpack-deps:buster-curl '
10
10
11
11
serverImage=" $1 "
12
12
@@ -18,8 +18,10 @@ _request() {
18
18
local url=" ${1#/ } "
19
19
shift
20
20
21
- docker run --rm --link " $cid " :open-liberty " $clientImage " \
22
- wget -q -O - " $@ " " http://open-liberty:9080/$url "
21
+ docker run --rm \
22
+ --link " $cid " :open-liberty \
23
+ " $clientImage " \
24
+ curl -fsSL " $@ " " http://open-liberty:9080/$url "
23
25
}
24
26
25
27
# Make sure that Open Liberty is listening
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
5
5
6
6
image=" $1 "
7
7
8
- # since we have curl in the php image, we'll use that
9
- clientImage=" $1 "
8
+ # Use a client image with curl for testing
9
+ clientImage=' buildpack-deps:buster-curl '
10
10
11
11
serverImage=" $( " $dir /../image-name.sh" librarytest/php-apache-hello-web " $image " ) "
12
12
" $dir /../docker-build.sh" " $dir " " $serverImage " << EOD
@@ -25,7 +25,9 @@ _request() {
25
25
local url=" ${1#/ } "
26
26
shift
27
27
28
- docker run --rm --link " $cid " :apache " $clientImage " \
28
+ docker run --rm \
29
+ --link " $cid " :apache \
30
+ " $clientImage " \
29
31
curl -fs -X" $method " " $@ " " http://apache/$url "
30
32
}
31
33
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
3
4
+ # not using '--entrypoint', since regular entrypoint sets up config
4
5
docker run -i --rm \
5
6
-e PLONE_DEVELOP=src/eea.facetednavigation \
6
7
-e PLONE_ADDONS=eea.facetednavigation \
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
3
4
+ # not using '--entrypoint', since regular entrypoint sets up config
4
5
docker run -i --rm \
5
6
-e CORS_ALLOW_ORIGIN=" http://example.com:4300,http://example.com:5300" \
6
7
-e CORS_ALLOW_METHODS=" DELETE,PUT" \
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
3
4
+ # not using '--entrypoint', since regular entrypoint sets up config
4
5
docker run -i --rm \
5
6
-e PLONE_DEVELOP=src/eea.facetednavigation \
6
7
-e PLONE_ADDONS=eea.facetednavigation \
Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ cid="$(docker run -d --name "$cname" "$serverImage")"
19
19
trap " docker rm -vf $cid > /dev/null" EXIT
20
20
21
21
client () {
22
- docker run -i --rm --link " $cname " :rabbitmq " $clientImage " " $@ "
22
+ docker run -i --rm \
23
+ --link " $cname " :rabbitmq \
24
+ " $clientImage " \
25
+ " $@ "
23
26
}
24
27
25
28
. " $dir /../../retry.sh" ' client testconn.py'
Original file line number Diff line number Diff line change 27
27
28
28
testImage=" $( " $dir /../image-name.sh" librarytest/rabbitmq-tls-test " $1 " ) "
29
29
" $dir /../docker-build.sh" " $dir " " $testImage " << 'EOD '
30
- FROM alpine:3.10
30
+ FROM alpine:3.11
31
31
RUN apk add --no-cache bash coreutils drill openssl procps
32
32
# https://github.com/drwetter/testssl.sh/releases
33
33
ENV TESTSSL_VERSION 2.9.5-8
@@ -46,15 +46,25 @@ cid="$(docker run -d --name "$cname" --hostname "$cname" -e RABBITMQ_ERLANG_COOK
46
46
trap " docker rm -vf $cid > /dev/null" EXIT
47
47
48
48
testssl () {
49
- docker run -i --rm --link " $cname " " $testImage " \
49
+ docker run -i --rm \
50
+ --link " $cname " \
51
+ " $testImage " \
50
52
testssl.sh --quiet --color 0 " $@ " " $cname :5671"
51
53
}
52
54
rabbitmqctl () {
53
- docker run -i --rm --link " $cname " -e RABBITMQ_ERLANG_COOKIE " $serverImage " \
55
+ # not using '--entrypoint', since regular entrypoint does needed env setup
56
+ docker run -i --rm \
57
+ --link " $cname " \
58
+ -e RABBITMQ_ERLANG_COOKIE \
59
+ " $serverImage " \
54
60
rabbitmqctl --node " rabbit@$cname " " $@ "
55
61
}
56
62
rabbitmq-diagnostics () {
57
- docker run -i --rm --link " $cname " -e RABBITMQ_ERLANG_COOKIE " $serverImage " \
63
+ # not using '--entrypoint', since regular entrypoint does needed env setup
64
+ docker run -i --rm \
65
+ --link " $cname " \
66
+ -e RABBITMQ_ERLANG_COOKIE \
67
+ " $serverImage " \
58
68
rabbitmq-diagnostics --node " rabbit@$cname " " $@ "
59
69
}
60
70
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
9
9
image=" $1 "
10
10
11
11
# Use a client image with curl for testing
12
- clientImage=' buildpack-deps:stretch -curl'
12
+ clientImage=' buildpack-deps:buster -curl'
13
13
14
14
# Create an instance of the container-under-test
15
15
serverImage=" $( " $dir /../image-name.sh" librarytest/rapidoid-hello-web " $image " ) "
@@ -31,7 +31,9 @@ _request() {
31
31
local url=" ${1#/ } "
32
32
shift
33
33
34
- docker run --rm --link " $cid " :rapidoid " $clientImage " \
34
+ docker run --rm \
35
+ --link " $cid " :rapidoid \
36
+ " $clientImage " \
35
37
curl -fs -X" $method " " $@ " " http://rapidoid:8888/$url "
36
38
}
37
39
You can’t perform that action at this time.
0 commit comments