Skip to content

Commit 9d1f229

Browse files
committed
Fix integration test for ddb-docker-compose project
1 parent da9949f commit 9d1f229

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

examples/ddb-docker-compose/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ services:
1616
# In this case, lambda function container have to call dynamodb api to `ddb` host.
1717
ddb:
1818
image: amazon/dynamodb-local:latest
19+
container_name: ddb_local
1920
ports:
2021
- 8000:8000
2122
networks:

examples/ddb-docker-compose/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: '3'
33
services:
44
ddb:
55
image: amazon/dynamodb-local:latest
6+
container_name: ddb_local
67
ports:
78
- 8000:8000
89
networks:

examples/ddb-docker-compose/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ fi
2424
docker-compose up -d
2525

2626
echo "wait until dynamodb-local is running"
27+
# We have to specify container name because default nameing rule is defferent from mac and linux. See: https://github.com/docker/for-mac/issues/6035
28+
CONTAINER_NAME=ddb_local # defined in docker-compose.yml
2729
RETRY=30
28-
CONTAINER_NAME=ddb-docker-compose-ddb-1
2930
until [ "$( docker container inspect -f '{{.State.Running}}' $CONTAINER_NAME )" == "true" ]
3031
do
3132
if [ $RETRY -ge 0 ]

0 commit comments

Comments
 (0)