Skip to content

Commit

Permalink
adds wait script
Browse files Browse the repository at this point in the history
  • Loading branch information
daschaa committed Dec 30, 2024
1 parent e36a9e8 commit 916c226
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
export AWS_ACCESS_KEY_ID="DUMMYIDEXAMPLE"
export AWS_SECRET_ACCESS_KEY="DUMMYEXAMPLEKEY"
export AWS_SESSION_TOKEN="dummy"
./docker/wait-for-db.sh
aws dynamodb create-table \
--region eu-west-1 \
--table-name clients \
Expand Down
10 changes: 10 additions & 0 deletions docker/wait-for-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
export AWS_ACCESS_KEY_ID="DUMMYIDEXAMPLE"
export AWS_SECRET_ACCESS_KEY="DUMMYEXAMPLEKEY"
export AWS_SESSION_TOKEN="dummy"
until aws --region us-east-1 --endpoint-url=http://localhost:8000 dynamodb list-tables; do
>&2 echo "DynamoDB is unavailable - sleeping"
sleep 1
done

echo "DynamoDB is available"

0 comments on commit 916c226

Please # to comment.