Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/test_real_https.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,34 @@ def test_https():
assert result == np.array([220.3180694580078], dtype="float32")


def test_https_globus():
"""
Test with a globus file instead.

The example below is Apache HTTP Server (httpd),
not NGINX, for a standard Globus Connect Server (GCS) HTTPS collection.
The example is g-52ba3.fd635.8443.data.globus.org. 60 IN A 140.221.68.105
which is a node hosted at Argonne National Lab, Chicago.
"""
test_file_uri = "https://g-52ba3.fd635.8443.data.globus.org/css03_data/CMIP6/CMIP/CCCma/CanESM5/historical/r1i1p1f1/Amon/tas/gn/v20190429/tas_Amon_CanESM5_historical_r1i1p1f1_gn_185001-201412.nc"
# perform a basic remote load test first
fh = load_from_https(test_file_uri)
ds = fh["tas"]
print("Dataset loaded from Globus:", ds)

# now let's active storage it
active_storage_url = "https://reductionist.jasmin.ac.uk/" # Wacasoft new Reductionist
active = Active(test_file_uri, "tas",
active_storage_url=active_storage_url)
active._version = 2
result = active.min()[0:3, 4:6, 7:9]
print("Result is", result)
# the returned element is a fully contained masked array
assert result == np.array([[[215.90142822265625]]],
dtype="float32")



def test_https_axis_1():
"""Test https with axis 1."""
# FIXME fails frequently on CEDA NGINX: Reductionist: 400 Bad Request
Expand Down
Loading