Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.8'
services:
dynamodb-local:
command: "-jar DynamoDBLocal.jar -sharedDb -inMemory"
image: "amazon/dynamodb-local:latest"
container_name: dynamodb-local
ports:
- "8000:8000"
29 changes: 29 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash -e
# Test script which assumes DynamoDB Local is ready and available via `docker-compose up`

# Test basic restore and backup
mkdir -p dump && cp -a tests/testTable dump
python dynamodump/dynamodump.py -m restore --noConfirm -r local -s testTable -d testRestoredTable \
--host localhost --port 8000 --accessKey a --secretKey a
python dynamodump/dynamodump.py -m backup -r local -s testRestoredTable --host localhost --port 8000 \
--accessKey a --secretKey a
python tests/test.py

# Test wildcard restore and backup
python dynamodump/dynamodump.py -m restore --noConfirm -r local -s "*" --host localhost --port 8000 \
--accessKey a --secretKey a
rm -rf dump/test*
python dynamodump/dynamodump.py -m backup -r local -s "*" --host localhost --port 8000 --accessKey a \
--secretKey a
python tests/test.py

# Test prefixed wildcard restore and backup
python dynamodump/dynamodump.py -m restore --noConfirm -r local -s "test*" --host localhost --port 8000 \
--accessKey a --secretKey a --prefixSeparator ""
rm -rf dump/test*
python dynamodump/dynamodump.py -m backup -r local -s "test*" --host localhost --port 8000 --accessKey a \
--secretKey a --prefixSeparator ""
python tests/test.py

# Clean up
rm -rf dump/test*