Skip to content

Commit

Permalink
Add test for missing AWS credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
bracki committed Apr 1, 2016
1 parent 5974a57 commit fccd648
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions integration/dynamodb/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,26 @@ aws dynamodb put-item --table-name confd --region eu-west-1 \
--item '{ "key": { "S": "/prefix/upstream/app2" }, "value": {"S": "10.0.1.11:8080"}}' \
--endpoint-url http://localhost:8000

# Run confd, expect it to work
confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend dynamodb --table confd
if [ $? -ne 0 ]
then
exit 1
fi

# Run confd with --watch, expecting it to fail
confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend dynamodb --table confd --watch
if [ $? -eq 0 ]
then
exit 1
fi

# Run confd without AWS credentials, expecting it to fail
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY

confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend dynamodb --table confd
if [ $? -eq 0 ]
then
exit 1
fi

0 comments on commit fccd648

Please sign in to comment.