-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David n. Jumani
committed
May 12, 2019
1 parent
41f0249
commit a7c082f
Showing
5 changed files
with
219 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker rm -f dynamodb > /dev/null | ||
docker run --name dynamodb -p 8000:8000 amazon/dynamodb-local > /dev/null & | ||
|
||
|
||
export DYNAMO_ENDPOINT="http://localhost:8000" | ||
export DYNAMO_TEST_REGION="us-west-2" | ||
export DYNAMO_TEST_TABLE="TestDB" | ||
|
||
aws dynamodb delete-table \ | ||
--table-name $DYNAMO_TEST_TABLE \ | ||
--endpoint-url $DYNAMO_ENDPOINT > /dev/null 2>&1 | ||
|
||
aws dynamodb create-table \ | ||
--table-name $DYNAMO_TEST_TABLE \ | ||
--attribute-definitions \ | ||
AttributeName=UserID,AttributeType=N \ | ||
AttributeName=Time,AttributeType=S \ | ||
--key-schema \ | ||
AttributeName=UserID,KeyType=HASH \ | ||
AttributeName=Time,KeyType=RANGE \ | ||
--provisioned-throughput ReadCapacityUnits=1000,WriteCapacityUnits=1000 \ | ||
--region $DYNAMO_TEST_REGION \ | ||
--endpoint-url $DYNAMO_ENDPOINT > /dev/null | ||
|
||
go test . -cover |