tests: optional delimiter to list_prefix

This commit is contained in:
John Spray
2023-09-05 16:03:14 +01:00
parent 8b2160793a
commit da96d34fa2

View File

@@ -255,7 +255,7 @@ def assert_prefix_not_empty(neon_env_builder: "NeonEnvBuilder", prefix: Optional
def list_prefix(
neon_env_builder: "NeonEnvBuilder", prefix: Optional[str] = None
neon_env_builder: "NeonEnvBuilder", prefix: Optional[str] = None, delimiter: str = "/"
) -> ListObjectsV2OutputTypeDef:
"""
Note that this function takes into account prefix_in_bucket.
@@ -275,7 +275,7 @@ def list_prefix(
# Note that this doesnt use pagination, so list is not guaranteed to be exhaustive.
response = remote.client.list_objects_v2(
Delimiter="/",
Delimiter=delimiter,
Bucket=remote.bucket_name,
Prefix=prefix,
)