Skip to content

Commit

Permalink
Remove logger info tests/integration/test_auth.py
Browse files Browse the repository at this point in the history
Co-authored-by: Chuck Daniels <[email protected]>
  • Loading branch information
Sherwin-14 and chuckwondo committed Jul 27, 2024
1 parent 1005dc4 commit 873a7a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/integration/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import earthaccess
import pytest
import requests
import s3fs

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -85,14 +86,12 @@ def test_auth_can_fetch_s3_credentials(daac):
auth = earthaccess.login(strategy="environment")
assert auth.authenticated
try:
logger.info(f"Testing S3 credentials for {daac['short-name']}")
credentials = earthaccess.get_s3_credentials(daac["short-name"])
except requests.RequestException as e:
logger.error(f"Failed to fetch S3 credentials: {e}")
else:
assert isinstance(credentials, dict)
assert "accessKeyId" in credentials
except Exception as e:
logger.error(
f"An error occured while trying to fetch S3 credentials for {daac['short-name']}: {e}"
)


@pytest.mark.parametrize("location", ({"daac": "podaac"}, {"provider": "pocloud"}))
Expand Down

0 comments on commit 873a7a4

Please sign in to comment.