File tree Expand file tree Collapse file tree
packages/google-cloud-logging/tests/system Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525class TestSystemLoggingServiceV2 (object ):
2626 def test_write_log_entries (self ):
27- # Use the monorepo standard environment variable
28- project_id = os .environ .get ("GOOGLE_CLOUD_PROJECT" )
27+ # Use GOOGLE_CLOUD_PROJECT or PROJECT_ID
28+ project_id = os .environ .get ("GOOGLE_CLOUD_PROJECT" ) or os .environ .get (
29+ "PROJECT_ID"
30+ )
2931
3032 # Guard: Skip if project or credentials are missing
3133 # This prevents the "prerelease_deps" job from failing
Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ class Config(object):
105105
106106
107107def setUpModule ():
108- # Use GOOGLE_CLOUD_PROJECT
109- project_id = os .environ .get ("GOOGLE_CLOUD_PROJECT" )
108+ # Use GOOGLE_CLOUD_PROJECT or PROJECT_ID
109+ project_id = os .environ .get ("GOOGLE_CLOUD_PROJECT" ) or os . environ . get ( "PROJECT_ID" )
110110
111111 # Check if we have credentials (either via file or environment)
112112 # google.auth.default() will check GOOGLE_APPLICATION_CREDENTIALS
You can’t perform that action at this time.
0 commit comments