Check bucket before trying to create it (#1874)

This makes it easier to run tests against S3 other than S3Proxy.
This commit is contained in:
Andrew Gaul 2022-01-26 23:42:12 +09:00 committed by GitHub
parent 662882d2f0
commit 74c11ef226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,9 @@ fi
start_s3proxy
aws_cli s3 mb "s3://${TEST_BUCKET_1}" --region "${S3_ENDPOINT}"
if ! aws_cli s3api head-bucket --bucket "${TEST_BUCKET_1}" --region "${S3_ENDPOINT}"; then
aws_cli s3 mb "s3://${TEST_BUCKET_1}" --region "${S3_ENDPOINT}"
fi
for flag in "${FLAGS[@]}"; do
echo "testing s3fs flag: ${flag}"