Skip to content

Unit tests can fail from connectivity issues to NASA services #1321

Description

@mfisher87

Is this issue already tracked somewhere, or is this a new report?

  • I've reviewed existing issues and couldn't find a duplicate for this problem.

Have you checked the status of Earthdata services?

  • I've executed earthaccess.status() and both CMR and EDL returned 'OK'.

Current Behavior

https://github.com/earthaccess-dev/earthaccess/actions/runs/25002738931/attempts/1?pr=1317

FAILED tests/unit/test_deprecations.py::test_deprecation_warning_for_store - requests.exceptions.ConnectionError: HTTPSConnectionPool(host='urs.earthdata.nasa.gov', port=443): Max retries exceeded with url: /profile (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f304e829940>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

Expected Behavior

These requests should be mocked so we don't require a third-party service to be live to run unit tests.

Steps To Reproduce

Run unit tests

Be lucky (unlucky?) that a NASA service is down

Environment

GitHub Actions

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: triageMore information is needed to determine whether this issue should be worked or closed.type: bugBugs causing incorrect or unexpected behavior. Applied automatically if using Bug template.

    Type

    No type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions