Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
test upload big file (#113)
Browse files Browse the repository at this point in the history
* test big file

* qa
  • Loading branch information
malmans2 authored Nov 6, 2024
1 parent e9f335e commit 5d99da5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/integration_test_90_features.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import datetime
import os
import pathlib
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -68,3 +70,18 @@ def test_features_mars_cds_adaptor_format(
_, actual_extension = os.path.splitext(result)
assert actual_extension == expected_extension
assert os.path.getsize(result)


def test_features_upload_big_file(
api_anon_client: ApiClient, tmp_path: pathlib.Path
) -> None:
# See: https://github.com/fsspec/s3fs/pull/910
target = str(tmp_path / "test.grib")
size = 1_048_576_000 + 1
api_anon_client.retrieve(
"test-adaptor-dummy",
size=size,
_timestamp=datetime.datetime.now().isoformat(),
target=target,
)
assert os.path.getsize(target) == size

0 comments on commit 5d99da5

Please sign in to comment.