Skip to content

Commit

Permalink
Make default value for vfs.s3.region in test conditional (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis authored Oct 16, 2024
1 parent f1b09f3 commit dcef155
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit dcef155

Please sign in to comment.