Skip to content

Commit

Permalink
Set CreateBucketConfiguration in test bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
simenheg committed Jun 3, 2024
1 parent f98d2b2 commit 481ce48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import urllib

import boto3
Expand All @@ -19,7 +20,10 @@ def s3_client():
@pytest.fixture
def s3_bucket(s3_client):
bucket = "ok-origo-dataplatform-test"
s3_client.create_bucket(Bucket=bucket)
s3_client.create_bucket(
Bucket=bucket,
CreateBucketConfiguration={"LocationConstraint": os.environ["AWS_REGION"]},
)
return s3_client, bucket


Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ deps=
commands=
pytest
setenv =
AWS_REGION=eu-west-1
AWS_ACCESS_KEY_ID = mock
AWS_SECRET_ACCESS_KEY = mock
AWS_XRAY_SDK_ENABLED = false
Expand Down

0 comments on commit 481ce48

Please sign in to comment.