Skip to content

Commit f4f6fb7

Browse files
committed
Scripts harmonization
1 parent 609a2e2 commit f4f6fb7

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

scripts/create-buckets.sh

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
#!/bin/sh
22
trap "exit 1" INT
33

4-
AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL:-http://s3:9000}
5-
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-local}
6-
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-local}
7-
AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-eu-west-1}
4+
AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL:-http://localhost:9000}
85

9-
echo "here is ${AWS_ACCESS_KEY_ID} "
10-
11-
aws configure set aws_access_key_id ${AWS_ACCESS_KEY_ID}
12-
aws configure set aws_secret_access_key ${AWS_SECRET_ACCESS_KEY}
13-
aws configure set default.region ${AWS_DEFAULT_REGION}
14-
15-
16-
aws --endpoint-url ${AWS_ENDPOINT_URL} s3 mb s3://documents
17-
aws --endpoint-url ${AWS_ENDPOINT_URL} s3 mb s3://pictures
18-
aws --endpoint-url ${AWS_ENDPOINT_URL} s3 mb s3://files
6+
BUCKETS="documents pictures files"
7+
for BUCKET in $BUCKETS
8+
do
9+
until aws --endpoint-url ${AWS_ENDPOINT_URL} s3 ls s3://${BUCKET} > /dev/null 2> /dev/null
10+
do
11+
echo "Creating bucket $BUCKET"
12+
aws --endpoint-url ${AWS_ENDPOINT_URL} s3 \
13+
mb s3://${BUCKET} \
14+
> /dev/null 2> /dev/null
15+
done &
16+
done
1917

2018
wait
2119

22-
trap - INT
20+
trap - INT

tests/serverless-plugins-integration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start:sqs": "sls --config serverless.sqs.yml offline",
88
"start:s3": "sls --config serverless.s3.yml offline",
99
"start:dynamodb-streams": "sls --config serverless.dynamodb-streams.yml offline",
10-
"test": "npm run test:s3 && npm run test:sqs && npm run test:sqs:autocreate && npm run test:kinesis && npm run test:dynamodb-streams",
10+
"test": "npm run test:dynamodb-streams && npm run test:kinesis && npm run test:s3 && npm run test:sqs && npm run test:sqs:autocreate",
1111
"setup-service": "../../scripts/clean-start.sh",
1212
"pretest:dynamodb-streams": "npm run -s setup-service dynamodb",
1313
"test:dynamodb-streams": "node test-dynamodb-streams",

0 commit comments

Comments
 (0)