From dcef1552508c3f397e5484ee3925407006674317 Mon Sep 17 00:00:00 2001 From: Agisilaos Kounelis <36283973+kounelisagis@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:49:38 +0300 Subject: [PATCH] Make default value for `vfs.s3.region` in test conditional (#2086) --- tiledb/tests/test_fixes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tiledb/tests/test_fixes.py b/tiledb/tests/test_fixes.py index 1a9c605111..da17a2ea87 100644 --- a/tiledb/tests/test_fixes.py +++ b/tiledb/tests/test_fixes.py @@ -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): @@ -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") == ""