Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default value for vfs.s3.region in test conditional #2086

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tiledb/tests/test_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_py1078_df_all_empty_strings(self):
def test_sc23827_aws_region(self):
# Test for SC-23287
# The expected behavior here for `vfs.s3.region` is:
# - default to 'us-east-1' if no environment variables are set
# - default to '' if no environment variables are set
# - empty if AWS_REGION or AWS_DEFAULT_REGION is set (to any value)

def get_config_with_env(env, key):
Expand All @@ -209,7 +209,10 @@ def get_config_with_env(env, key):
)
return sp_output.decode("UTF-8").strip()

assert get_config_with_env({}, "vfs.s3.region") == "us-east-1"
if tiledb.libtiledb.version() >= (2, 27, 0):
assert get_config_with_env({}, "vfs.s3.region") == ""
else:
assert get_config_with_env({}, "vfs.s3.region") == "us-east-1"
assert get_config_with_env({"AWS_DEFAULT_REGION": ""}, "vfs.s3.region") == ""
assert get_config_with_env({"AWS_REGION": ""}, "vfs.s3.region") == ""

Expand Down
Loading