Skip to content

Commit

Permalink
Try using application default credentials (this definitely won't work)
Browse files Browse the repository at this point in the history
  • Loading branch information
aazuspan committed Jan 29, 2025
1 parent 883c245 commit c502064
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
import warnings
from collections import UserDict
from pathlib import Path
Expand Down Expand Up @@ -70,18 +69,7 @@ def pytest_sessionstart(session):


def _init_ee_for_tests():
# Use the Github Service Account for CI tests
if os.environ.get("GITHUB_ACTIONS"):
key_data = os.environ.get("EE_SERVICE_ACCOUNT")
project_id = json.loads(key_data).get("project_id")
credentials = ee.ServiceAccountCredentials(None, key_data=key_data)
# Use stored persistent credentials for local tests
else:
# Project should be parsed from credentials
project_id = None
credentials = "persistent"

ee.Initialize(credentials, project=project_id)
ee.Initialize()


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit c502064

Please sign in to comment.