-
Notifications
You must be signed in to change notification settings - Fork 288
/
test.sh
executable file
·29 lines (25 loc) · 1.21 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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*