File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ version : ' 3.8'
2+ services :
3+ dynamodb-local :
4+ command : " -jar DynamoDBLocal.jar -sharedDb -inMemory"
5+ image : " amazon/dynamodb-local:latest"
6+ container_name : dynamodb-local
7+ ports :
8+ - " 8000:8000"
Original file line number Diff line number Diff line change 1+ #! /bin/bash -e
2+ # Test script which assumes DynamoDB Local is ready and available via `docker-compose up`
3+
4+ # Test basic restore and backup
5+ mkdir -p dump && cp -a tests/testTable dump
6+ python dynamodump/dynamodump.py -m restore --noConfirm -r local -s testTable -d testRestoredTable \
7+ --host localhost --port 8000 --accessKey a --secretKey a
8+ python dynamodump/dynamodump.py -m backup -r local -s testRestoredTable --host localhost --port 8000 \
9+ --accessKey a --secretKey a
10+ python tests/test.py
11+
12+ # Test wildcard restore and backup
13+ python dynamodump/dynamodump.py -m restore --noConfirm -r local -s " *" --host localhost --port 8000 \
14+ --accessKey a --secretKey a
15+ rm -rf dump/test*
16+ python dynamodump/dynamodump.py -m backup -r local -s " *" --host localhost --port 8000 --accessKey a \
17+ --secretKey a
18+ python tests/test.py
19+
20+ # Test prefixed wildcard restore and backup
21+ python dynamodump/dynamodump.py -m restore --noConfirm -r local -s " test*" --host localhost --port 8000 \
22+ --accessKey a --secretKey a --prefixSeparator " "
23+ rm -rf dump/test*
24+ python dynamodump/dynamodump.py -m backup -r local -s " test*" --host localhost --port 8000 --accessKey a \
25+ --secretKey a --prefixSeparator " "
26+ python tests/test.py
27+
28+ # Clean up
29+ rm -rf dump/test*
You can’t perform that action at this time.
0 commit comments