Skip to content

Commit 527ad25

Browse files
committed
test docker subnet
1 parent 2f24ec5 commit 527ad25

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

docker/find_active_endpoint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
COORDINATORS=("172.17.0.1:8529" "172.17.0.1:8539" "172.17.0.1:8549")
3+
GW=172.28.0.1
4+
COORDINATORS=("$GW:8529" "$GW:8539" "$GW:8549")
45

56
for a in ${COORDINATORS[*]} ; do
67
if curl -u root:test --silent --fail "http://$a"; then

docker/start_db.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ SSL=${SSL:=false}
1616
DATABASE_EXTENDED_NAMES=${DATABASE_EXTENDED_NAMES:=false}
1717

1818
STARTER_DOCKER_IMAGE=docker.io/arangodb/arangodb-starter:latest
19+
GW=172.28.0.1
20+
docker network create arangodb --subnet 172.28.0.0/16
1921

2022
# exit when any command fails
2123
set -e
@@ -32,10 +34,10 @@ AUTHORIZATION_HEADER=$(cat "$LOCATION"/jwtHeader)
3234
STARTER_ARGS=
3335
SCHEME=http
3436
ARANGOSH_SCHEME=http+tcp
35-
COORDINATORS=("172.17.0.1:8529" "172.17.0.1:8539" "172.17.0.1:8549")
37+
COORDINATORS=("$GW:8529" "$GW:8539" "$GW:8549")
3638

3739
if [ "$STARTER_MODE" == "single" ]; then
38-
COORDINATORS=("172.17.0.1:8529")
40+
COORDINATORS=("$GW:8529")
3941
fi
4042

4143
if [ "$SSL" == "true" ]; then
@@ -66,7 +68,7 @@ docker run -d \
6668
$STARTER_ARGS \
6769
--docker.container=adb \
6870
--auth.jwt-secret=/jwtSecret \
69-
--starter.address=172.17.0.1 \
71+
--starter.address="${GW}" \
7072
--docker.image="${DOCKER_IMAGE}" \
7173
--starter.local --starter.mode=${STARTER_MODE} --all.log.level=debug --all.log.output=+ --log.verbose
7274

src/test/resources/arangodb.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
arangodb.hosts=172.17.0.1:8529
1+
arangodb.hosts=172.28.0.1:8529
22
arangodb.connections.max=20
33
arangodb.acquireHostList=true
44
arangodb.password=test

0 commit comments

Comments
 (0)