test ract
This commit is contained in:
@@ -33,16 +33,16 @@ def ensure_bucket(client: Minio):
|
||||
try:
|
||||
if not client.bucket_exists(MINIO_BUCKET):
|
||||
client.make_bucket(MINIO_BUCKET)
|
||||
policy = f"""{{
|
||||
"Version":"2012-10-17",
|
||||
"Statement":[{{
|
||||
"Effect":"Allow",
|
||||
"Principal":"*",
|
||||
"Action":["s3:GetObject"],
|
||||
"Resource":["arn:aws:s3:::{MINIO_BUCKET}/*"]
|
||||
}}]
|
||||
}}"""
|
||||
client.set_bucket_policy(MINIO_BUCKET, policy)
|
||||
policy = f"""{{
|
||||
"Version":"2012-10-17",
|
||||
"Statement":[{{
|
||||
"Effect":"Allow",
|
||||
"Principal":"*",
|
||||
"Action":["s3:GetObject"],
|
||||
"Resource":["arn:aws:s3:::{MINIO_BUCKET}/*"]
|
||||
}}]
|
||||
}}"""
|
||||
client.set_bucket_policy(MINIO_BUCKET, policy)
|
||||
except S3Error:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user