Skip to content

Commit

Permalink
update docker storage mounts smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
landscapepainter committed Jun 28, 2024
1 parent 98fcd5f commit 1a15411
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,13 @@ def test_docker_storage_mounts(generic_cloud: str, image_id: str):
template_str = pathlib.Path(
'tests/test_yamls/test_storage_mounting.yaml.j2').read_text()
template = jinja2.Template(template_str)
content = template.render(storage_name=storage_name)
# ubuntu 18.04 does not support fuse3, and blobfuse2 depends on fuse3.
azure_mount_unsupported_ubuntu_version = '18.04'
if azure_mount_unsupported_ubuntu_version in image_id:
content = template.render(storage_name=storage_name,
include_azure_mount=False)
else:
content = template.render(storage_name=storage_name,)
with tempfile.NamedTemporaryFile(suffix='.yaml', mode='w') as f:
f.write(content)
f.flush()
Expand Down
6 changes: 5 additions & 1 deletion tests/test_yamls/test_storage_mounting.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ file_mounts:
source: gs://gcp-public-data-sentinel-2
mode: MOUNT

{% if include_azure_mount | default(True) %}
# Mounting public buckets for Azure
/mount_public_azure:
source: https://azureopendatastorage.blob.core.windows.net/nyctlc
mode: MOUNT
{% endif %}

# Mounting private buckets in COPY mode with a source dir
/mount_private_copy:
Expand All @@ -38,8 +40,10 @@ run: |
# Check public bucket contents
ls -ltr /mount_public_s3/corpora
ls -ltr /mount_public_gcp/tiles
{% if include_azure_mount | default(True) %}
ls -ltr /mount_public_azure/green

{% endif %}

# Check private bucket contents
ls -ltr /mount_private_copy/foo
ls -ltr /mount_private_copy/tmp\ file
Expand Down

0 comments on commit 1a15411

Please sign in to comment.