Skip to content

Commit adabce5

Browse files
weisiAce Nassri
authored andcommitted
Functions: Use documented way to fetch current GCP project ID. (GoogleCloudPlatform#1594)
The document at https://cloud.google.com/functions/docs/env-var suggests using env['GCP_PROJECT'] for current project ID, and env['GCLOUD_PROJECT'] is deprecated.
1 parent e118431 commit adabce5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functions/helloworld/sample_pubsub_test_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from google.cloud import pubsub_v1
2323
import pytest
2424

25-
PROJECT = getenv('GCLOUD_PROJECT')
25+
PROJECT = getenv('GCP_PROJECT')
2626
TOPIC = getenv('TOPIC')
2727

2828
assert PROJECT is not None

functions/helloworld/sample_storage_test_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from google.cloud import storage
2323
import pytest
2424

25-
PROJECT = getenv('GCLOUD_PROJECT')
25+
PROJECT = getenv('GCP_PROJECT')
2626
BUCKET = getenv('BUCKET')
2727

2828
assert PROJECT is not None

0 commit comments

Comments
 (0)