Skip to content

Commit 7597cca

Browse files
committed
tests: enable system tests
1 parent ff062e4 commit 7597cca

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

packages/google-cloud-logging/tests/system/gapic/v2/test_system_logging_service_v2_v2.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424

2525
class 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

packages/google-cloud-logging/tests/system/test_system.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ class Config(object):
105105

106106

107107
def 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

0 commit comments

Comments
 (0)