|
1 | 1 | language: python |
| 2 | +env: |
| 3 | + - BOTO_CONFIG=/dev/null |
2 | 4 | python: |
3 | 5 | - "2.7" |
| 6 | +before_install: |
| 7 | + # install and run latest DynamoDB Local |
| 8 | + - mkdir /tmp/dynamodb_local |
| 9 | + - wget -O - https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz | tar xz --directory /tmp/dynamodb_local |
| 10 | + - java -Djava.library.path=/tmp/dynamodb_local/DynamoDBLocal_lib -jar /tmp/dynamodb_local/DynamoDBLocal.jar -sharedDb -inMemory & |
4 | 11 | install: |
5 | 12 | - pip install -r requirements.txt |
6 | 13 | - pip install flake8 |
7 | | - - nvm install 4 |
8 | | - - nvm use 4 |
9 | | - - npm install dynalite |
10 | 14 | script: |
11 | | - - flake8 --ignore=E501 --exclude=node_modules |
12 | | - - dynalite --port 4567 & |
| 15 | + - flake8 --ignore=E501 |
13 | 16 | - mkdir dump && cp -a test/testTable dump |
14 | | - - python dynamodump.py -m restore -r local -s testTable -d testRestoredTable --host localhost --port 4567 --accessKey a --secretKey a |
15 | | - - python dynamodump.py -m backup -r local -s testRestoredTable --host localhost --port 4567 --accessKey a --secretKey a |
| 17 | + # test basic restore and backup |
| 18 | + - python dynamodump.py -m restore -r local -s testTable -d testRestoredTable --host localhost --port 8000 --accessKey a --secretKey a |
| 19 | + - python dynamodump.py -m backup -r local -s testRestoredTable --host localhost --port 8000 --accessKey a --secretKey a |
16 | 20 | - python test/test.py |
17 | | - - python dynamodump.py -m restore -r local -s "*" --host localhost --port 4567 --accessKey a --secretKey a |
| 21 | + # test wildcard restore and backup |
| 22 | + - python dynamodump.py -m restore -r local -s "*" --host localhost --port 8000 --accessKey a --secretKey a |
18 | 23 | - rm -rf dump/test* |
19 | | - - python dynamodump.py -m backup -r local -s "*" --host localhost --port 4567 --accessKey a --secretKey a |
| 24 | + - python dynamodump.py -m backup -r local -s "*" --host localhost --port 8000 --accessKey a --secretKey a |
20 | 25 | - python test/test.py |
21 | | - - python dynamodump.py -m restore -r local -s "test*" --host localhost --port 4567 --accessKey a --secretKey a --prefixSeparator "" |
| 26 | + # test prefixed wildcard restore and backup |
| 27 | + - python dynamodump.py -m restore -r local -s "test*" --host localhost --port 8000 --accessKey a --secretKey a --prefixSeparator "" |
22 | 28 | - rm -rf dump/test* |
23 | | - - python dynamodump.py -m backup -r local -s "test*" --host localhost --port 4567 --accessKey a --secretKey a --prefixSeparator "" |
| 29 | + - python dynamodump.py -m backup -r local -s "test*" --host localhost --port 8000 --accessKey a --secretKey a --prefixSeparator "" |
24 | 30 | - python test/test.py |
25 | 31 | matrix: |
26 | 32 | fast_finish: true |
0 commit comments