diff --git a/appengine/flexible/tasks/create_app_engine_queue_task_test.py b/appengine/flexible/tasks/create_app_engine_queue_task_test.py index 39edff129930..47e75fd142dc 100644 --- a/appengine/flexible/tasks/create_app_engine_queue_task_test.py +++ b/appengine/flexible/tasks/create_app_engine_queue_task_test.py @@ -16,7 +16,7 @@ import create_app_engine_queue_task -TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT') +TEST_PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') TEST_LOCATION = os.getenv('TEST_QUEUE_LOCATION', 'us-central1') TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'my-appengine-queue') diff --git a/appengine/flexible/tasks/snippets_test.py b/appengine/flexible/tasks/snippets_test.py index f145d13b6b5c..c242f8140773 100644 --- a/appengine/flexible/tasks/snippets_test.py +++ b/appengine/flexible/tasks/snippets_test.py @@ -19,7 +19,7 @@ import snippets -TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT') +TEST_PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') TEST_LOCATION = os.getenv('TEST_QUEUE_LOCATION', 'us-central1') QUEUE_NAME_1 = "queue-{}".format(uuid.uuid4()) QUEUE_NAME_2 = "queue-{}".format(uuid.uuid4()) diff --git a/appengine/standard/background/main_test.py b/appengine/standard/background/main_test.py index aa3b78caac72..2c2fcdab1f88 100644 --- a/appengine/standard/background/main_test.py +++ b/appengine/standard/background/main_test.py @@ -20,7 +20,7 @@ import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture diff --git a/appengine/standard/pubsub/main.py b/appengine/standard/pubsub/main.py index 038cd5fd6ea2..6f8eb731541d 100755 --- a/appengine/standard/pubsub/main.py +++ b/appengine/standard/pubsub/main.py @@ -30,7 +30,7 @@ app.config['PUBSUB_VERIFICATION_TOKEN'] = \ os.environ['PUBSUB_VERIFICATION_TOKEN'] app.config['PUBSUB_TOPIC'] = os.environ['PUBSUB_TOPIC'] -app.config['GCLOUD_PROJECT'] = os.environ['GOOGLE_CLOUD_PROJECT'] +app.config['GOOGLE_CLOUD_PROJECT'] = os.environ['GOOGLE_CLOUD_PROJECT'] # Global list to storage messages received by this instance. @@ -47,7 +47,7 @@ def index(): service = build('pubsub', 'v1') topic_path = 'projects/{project_id}/topics/{topic}'.format( - project_id=app.config['GCLOUD_PROJECT'], + project_id=app.config['GOOGLE_CLOUD_PROJECT'], topic=app.config['PUBSUB_TOPIC'] ) service.projects().topics().publish( diff --git a/appengine/standard/storage/api-client/main_test.py b/appengine/standard/storage/api-client/main_test.py index 1fc960987f64..8a0bdf7d8db9 100644 --- a/appengine/standard/storage/api-client/main_test.py +++ b/appengine/standard/storage/api-client/main_test.py @@ -19,7 +19,7 @@ import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def test_get(): diff --git a/appengine/standard/storage/appengine-client/main_test.py b/appengine/standard/storage/appengine-client/main_test.py index c3a05cecc574..08e27984841a 100644 --- a/appengine/standard/storage/appengine-client/main_test.py +++ b/appengine/standard/storage/appengine-client/main_test.py @@ -18,7 +18,7 @@ import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def test_get(testbed): diff --git a/appengine/standard_python3/pubsub/main.py b/appengine/standard_python3/pubsub/main.py index 26c2943aa852..e44b2699a4ec 100644 --- a/appengine/standard_python3/pubsub/main.py +++ b/appengine/standard_python3/pubsub/main.py @@ -32,7 +32,7 @@ app.config['PUBSUB_VERIFICATION_TOKEN'] = \ os.environ['PUBSUB_VERIFICATION_TOKEN'] app.config['PUBSUB_TOPIC'] = os.environ['PUBSUB_TOPIC'] -app.config['GCLOUD_PROJECT'] = os.environ['GOOGLE_CLOUD_PROJECT'] +app.config['GOOGLE_CLOUD_PROJECT'] = os.environ['GOOGLE_CLOUD_PROJECT'] # Global list to store messages, tokens, etc. received by this instance. MESSAGES = [] @@ -52,7 +52,7 @@ def index(): # Consider initializing the publisher client outside this function # for better latency performance. publisher = pubsub_v1.PublisherClient() - topic_path = publisher.topic_path(app.config['GCLOUD_PROJECT'], + topic_path = publisher.topic_path(app.config['GOOGLE_CLOUD_PROJECT'], app.config['PUBSUB_TOPIC']) future = publisher.publish(topic_path, data) future.result() diff --git a/appengine/standard_python37/pubsub/main.py b/appengine/standard_python37/pubsub/main.py index 26c2943aa852..e44b2699a4ec 100644 --- a/appengine/standard_python37/pubsub/main.py +++ b/appengine/standard_python37/pubsub/main.py @@ -32,7 +32,7 @@ app.config['PUBSUB_VERIFICATION_TOKEN'] = \ os.environ['PUBSUB_VERIFICATION_TOKEN'] app.config['PUBSUB_TOPIC'] = os.environ['PUBSUB_TOPIC'] -app.config['GCLOUD_PROJECT'] = os.environ['GOOGLE_CLOUD_PROJECT'] +app.config['GOOGLE_CLOUD_PROJECT'] = os.environ['GOOGLE_CLOUD_PROJECT'] # Global list to store messages, tokens, etc. received by this instance. MESSAGES = [] @@ -52,7 +52,7 @@ def index(): # Consider initializing the publisher client outside this function # for better latency performance. publisher = pubsub_v1.PublisherClient() - topic_path = publisher.topic_path(app.config['GCLOUD_PROJECT'], + topic_path = publisher.topic_path(app.config['GOOGLE_CLOUD_PROJECT'], app.config['PUBSUB_TOPIC']) future = publisher.publish(topic_path, data) future.result() diff --git a/asset/cloud-client/quickstart_batchgetassetshistory_test.py b/asset/cloud-client/quickstart_batchgetassetshistory_test.py index 6b446c9f8065..275a97f17ff8 100644 --- a/asset/cloud-client/quickstart_batchgetassetshistory_test.py +++ b/asset/cloud-client/quickstart_batchgetassetshistory_test.py @@ -24,7 +24,7 @@ import quickstart_batchgetassetshistory -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = 'assets-{}'.format(uuid.uuid4().hex) diff --git a/asset/cloud-client/quickstart_deletefeed_test.py b/asset/cloud-client/quickstart_deletefeed_test.py index 7d5d81a97a96..5ec6f8021128 100644 --- a/asset/cloud-client/quickstart_deletefeed_test.py +++ b/asset/cloud-client/quickstart_deletefeed_test.py @@ -23,7 +23,7 @@ import quickstart_createfeed import quickstart_deletefeed -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) TOPIC = 'topic-{}'.format(uuid.uuid4().hex) diff --git a/asset/cloud-client/quickstart_exportassets_test.py b/asset/cloud-client/quickstart_exportassets_test.py index 6b2b4b1c9954..9ed8bbffd8b3 100644 --- a/asset/cloud-client/quickstart_exportassets_test.py +++ b/asset/cloud-client/quickstart_exportassets_test.py @@ -22,7 +22,7 @@ import quickstart_exportassets -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = 'assets-{}'.format(uuid.uuid4().hex) diff --git a/asset/cloud-client/quickstart_getfeed_test.py b/asset/cloud-client/quickstart_getfeed_test.py index 9075582c054d..940ce35557fd 100644 --- a/asset/cloud-client/quickstart_getfeed_test.py +++ b/asset/cloud-client/quickstart_getfeed_test.py @@ -24,7 +24,7 @@ import quickstart_deletefeed import quickstart_getfeed -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) TOPIC = 'topic-{}'.format(uuid.uuid4().hex) diff --git a/asset/cloud-client/quickstart_listfeeds_test.py b/asset/cloud-client/quickstart_listfeeds_test.py index 87678f5d2339..a8982b7c774a 100644 --- a/asset/cloud-client/quickstart_listfeeds_test.py +++ b/asset/cloud-client/quickstart_listfeeds_test.py @@ -18,7 +18,7 @@ import quickstart_listfeeds -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def test_list_feeds(capsys): diff --git a/asset/cloud-client/quickstart_updatefeed_test.py b/asset/cloud-client/quickstart_updatefeed_test.py index ac611c1c9929..c996020ef82e 100644 --- a/asset/cloud-client/quickstart_updatefeed_test.py +++ b/asset/cloud-client/quickstart_updatefeed_test.py @@ -24,7 +24,7 @@ import quickstart_deletefeed import quickstart_updatefeed -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) TOPIC = 'topic-{}'.format(uuid.uuid4().hex) diff --git a/auth/api-client/snippets_test.py b/auth/api-client/snippets_test.py index 00161fc4d471..bec08d2ffc16 100644 --- a/auth/api-client/snippets_test.py +++ b/auth/api-client/snippets_test.py @@ -21,7 +21,7 @@ def test_implicit(): - snippets.implicit(os.environ['GCLOUD_PROJECT']) + snippets.implicit(os.environ['GOOGLE_CLOUD_PROJECT']) def test_explicit(): @@ -31,7 +31,7 @@ def test_explicit(): open_mock = mock.mock_open(read_data=creds_file_data) with mock.patch('io.open', open_mock): - snippets.explicit(os.environ['GCLOUD_PROJECT']) + snippets.explicit(os.environ['GOOGLE_CLOUD_PROJECT']) def test_explicit_compute_engine(): diff --git a/automl/beta/set_endpoint_test.py b/automl/beta/set_endpoint_test.py index e1518fe98c13..023393118231 100644 --- a/automl/beta/set_endpoint_test.py +++ b/automl/beta/set_endpoint_test.py @@ -17,7 +17,7 @@ import set_endpoint -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] def test_set_endpoint(capsys): diff --git a/automl/beta/video_classification_create_model_test.py b/automl/beta/video_classification_create_model_test.py index 25acb7d6bd0c..593166cb6478 100644 --- a/automl/beta/video_classification_create_model_test.py +++ b/automl/beta/video_classification_create_model_test.py @@ -20,7 +20,7 @@ import video_classification_create_model -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] DATASET_ID = "VCN510437278078730240" OPERATION_ID = None diff --git a/automl/beta/video_object_tracking_create_model_test.py b/automl/beta/video_object_tracking_create_model_test.py index edfea3e4d13e..a06d65bfe4dd 100644 --- a/automl/beta/video_object_tracking_create_model_test.py +++ b/automl/beta/video_object_tracking_create_model_test.py @@ -20,7 +20,7 @@ import video_object_tracking_create_model -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] DATASET_ID = "VOT2823376535338090496" OPERATION_ID = None diff --git a/bigquery/cloud-client/noxfile_config.py b/bigquery/cloud-client/noxfile_config.py index 950c3a070bd0..cfd0d439150c 100644 --- a/bigquery/cloud-client/noxfile_config.py +++ b/bigquery/cloud-client/noxfile_config.py @@ -28,7 +28,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - # 'gcloud_project_env': 'GCLOUD_PROJECT', + # 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/bigquery/cloud-client/user_credentials_test.py b/bigquery/cloud-client/user_credentials_test.py index 009b9be7f955..494903c75a11 100644 --- a/bigquery/cloud-client/user_credentials_test.py +++ b/bigquery/cloud-client/user_credentials_test.py @@ -21,7 +21,7 @@ from user_credentials import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture diff --git a/bigquery/pandas-gbq-migration/samples_test.py b/bigquery/pandas-gbq-migration/samples_test.py index 5a99c02cf1e9..670ef46f0013 100644 --- a/bigquery/pandas-gbq-migration/samples_test.py +++ b/bigquery/pandas-gbq-migration/samples_test.py @@ -49,7 +49,7 @@ def test_client_library_query(): project_id = 'your-project-id' # [END bigquery_migration_client_library_query] assert len(df) > 0 - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] # [START bigquery_migration_client_library_query] df = client.query(sql, project=project_id).to_dataframe() # [END bigquery_migration_client_library_query] @@ -74,7 +74,7 @@ def test_pandas_gbq_query(): project_id = 'your-project-id' # [END bigquery_migration_pandas_gbq_query] assert len(df) > 0 - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] # [START bigquery_migration_pandas_gbq_query] df = pandas.read_gbq(sql, project_id=project_id, dialect='standard') # [END bigquery_migration_pandas_gbq_query] diff --git a/bigquery/transfer/cloud-client/quickstart_test.py b/bigquery/transfer/cloud-client/quickstart_test.py index 0bb5ddd68110..cd397b814871 100644 --- a/bigquery/transfer/cloud-client/quickstart_test.py +++ b/bigquery/transfer/cloud-client/quickstart_test.py @@ -20,7 +20,7 @@ import quickstart -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture diff --git a/bigtable/hello/main_test.py b/bigtable/hello/main_test.py index 75fe4ff24e7c..49b8098fcd7e 100644 --- a/bigtable/hello/main_test.py +++ b/bigtable/hello/main_test.py @@ -17,7 +17,7 @@ from main import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_NAME_FORMAT = 'hello-world-test-{}' TABLE_NAME_RANGE = 10000 diff --git a/bigtable/hello_happybase/main_test.py b/bigtable/hello_happybase/main_test.py index d1dfc65c29dd..f72fc0b2e52b 100644 --- a/bigtable/hello_happybase/main_test.py +++ b/bigtable/hello_happybase/main_test.py @@ -17,7 +17,7 @@ from main import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_NAME_FORMAT = 'hello-world-hb-test-{}' TABLE_NAME_RANGE = 10000 diff --git a/bigtable/metricscaler/metricscaler.py b/bigtable/metricscaler/metricscaler.py index 3bfacd4ea81a..1957a81f1aa9 100644 --- a/bigtable/metricscaler/metricscaler.py +++ b/bigtable/metricscaler/metricscaler.py @@ -24,7 +24,7 @@ from google.cloud.bigtable import enums from google.cloud.monitoring_v3 import query -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def get_cpu_load(): diff --git a/bigtable/metricscaler/metricscaler_test.py b/bigtable/metricscaler/metricscaler_test.py index 6cd70cbffabc..548059135fc7 100644 --- a/bigtable/metricscaler/metricscaler_test.py +++ b/bigtable/metricscaler/metricscaler_test.py @@ -28,7 +28,7 @@ from metricscaler import main from metricscaler import scale_bigtable -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_ZONE = os.environ['BIGTABLE_ZONE'] SIZE_CHANGE_STEP = 3 INSTANCE_ID_FORMAT = 'metric-scale-test-{}' diff --git a/bigtable/quickstart/main_test.py b/bigtable/quickstart/main_test.py index a61e5dbe8795..55c06f413df9 100644 --- a/bigtable/quickstart/main_test.py +++ b/bigtable/quickstart/main_test.py @@ -21,7 +21,7 @@ from main import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_ID_FORMAT = 'quickstart-test-{}' TABLE_ID_RANGE = 10000 diff --git a/bigtable/quickstart_happybase/main_test.py b/bigtable/quickstart_happybase/main_test.py index 771026157f65..5d4ae1e7acd7 100644 --- a/bigtable/quickstart_happybase/main_test.py +++ b/bigtable/quickstart_happybase/main_test.py @@ -21,7 +21,7 @@ from main import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_ID_FORMAT = 'quickstart-hb-test-{}' TABLE_ID_RANGE = 10000 diff --git a/bigtable/snippets/filters/filters_test.py b/bigtable/snippets/filters/filters_test.py index 0d4b265f60c3..f46541bffd35 100644 --- a/bigtable/snippets/filters/filters_test.py +++ b/bigtable/snippets/filters/filters_test.py @@ -22,7 +22,7 @@ import filter_snippets -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_ID_PREFIX = 'mobile-time-series-{}' diff --git a/bigtable/snippets/reads/reads_test.py b/bigtable/snippets/reads/reads_test.py index 63fb3f2f3bad..fc3421000229 100644 --- a/bigtable/snippets/reads/reads_test.py +++ b/bigtable/snippets/reads/reads_test.py @@ -21,7 +21,7 @@ import read_snippets -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_ID_PREFIX = 'mobile-time-series-{}' diff --git a/bigtable/snippets/writes/writes_test.py b/bigtable/snippets/writes/writes_test.py index 8420a3eebd7e..abe3000959ec 100644 --- a/bigtable/snippets/writes/writes_test.py +++ b/bigtable/snippets/writes/writes_test.py @@ -26,7 +26,7 @@ from .write_simple import write_simple -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_ID_PREFIX = 'mobile-time-series-{}' diff --git a/bigtable/tableadmin/tableadmin_test.py b/bigtable/tableadmin/tableadmin_test.py index d6d3835a0bd1..782f6b621677 100755 --- a/bigtable/tableadmin/tableadmin_test.py +++ b/bigtable/tableadmin/tableadmin_test.py @@ -20,7 +20,7 @@ from tableadmin import delete_table from tableadmin import run_table_operations -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_NAME_FORMAT = 'tableadmin-test-{}' TABLE_NAME_RANGE = 10000 diff --git a/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py b/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py index 00b7c0bc7fa0..af983ce29d8e 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py +++ b/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py @@ -17,7 +17,7 @@ from blog import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.mark.flaky diff --git a/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py b/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py index 480298058ed8..460d894f0159 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py +++ b/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py @@ -17,7 +17,7 @@ from wiki import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.mark.flaky diff --git a/composer/workflows/dataflowtemplateoperator_create_dataset_and_table_test.py b/composer/workflows/dataflowtemplateoperator_create_dataset_and_table_test.py index e7e623d506e1..80fd03a0de4b 100644 --- a/composer/workflows/dataflowtemplateoperator_create_dataset_and_table_test.py +++ b/composer/workflows/dataflowtemplateoperator_create_dataset_and_table_test.py @@ -23,7 +23,7 @@ from . import dataflowtemplateoperator_create_dataset_and_table_helper as helper -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] client = bigquery.Client() diff --git a/compute/api/create_instance_test.py b/compute/api/create_instance_test.py index b65ed0c2a6e6..5888978cee45 100644 --- a/compute/api/create_instance_test.py +++ b/compute/api/create_instance_test.py @@ -18,7 +18,7 @@ from create_instance import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = os.environ['CLOUD_STORAGE_BUCKET'] diff --git a/compute/auth/access_token_test.py b/compute/auth/access_token_test.py index 4d65b020da8e..d685be8e9683 100644 --- a/compute/auth/access_token_test.py +++ b/compute/auth/access_token_test.py @@ -17,7 +17,7 @@ import access_token -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @mock.patch('access_token.requests') diff --git a/compute/auth/application_default_test.py b/compute/auth/application_default_test.py index 6d23b71639c1..4472814f0945 100644 --- a/compute/auth/application_default_test.py +++ b/compute/auth/application_default_test.py @@ -15,7 +15,7 @@ from application_default import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def test_main(): diff --git a/compute/encryption/generate_wrapped_rsa_key_test.py b/compute/encryption/generate_wrapped_rsa_key_test.py index 07a57c263424..74a7dce401b0 100644 --- a/compute/encryption/generate_wrapped_rsa_key_test.py +++ b/compute/encryption/generate_wrapped_rsa_key_test.py @@ -18,7 +18,7 @@ import generate_wrapped_rsa_key -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def test_main(): diff --git a/compute/oslogin/service_account_ssh_test.py b/compute/oslogin/service_account_ssh_test.py index 410985c98fca..fce2506f8ac7 100644 --- a/compute/oslogin/service_account_ssh_test.py +++ b/compute/oslogin/service_account_ssh_test.py @@ -40,7 +40,7 @@ def test_main(capsys): # Initialize variables. cmd = 'uname -a' - project = os.environ['GCLOUD_PROJECT'] + project = os.environ['GOOGLE_CLOUD_PROJECT'] test_id = 'oslogin-test-{id}'.format(id=str(random.randint(0, 1000000))) zone = 'us-east1-d' image_family = 'projects/debian-cloud/global/images/family/debian-9' diff --git a/container_registry/container_analysis/samples_test.py b/container_registry/container_analysis/samples_test.py index 535544e4265f..faab9b1d09ba 100644 --- a/container_registry/container_analysis/samples_test.py +++ b/container_registry/container_analysis/samples_test.py @@ -33,7 +33,7 @@ import samples -PROJECT_ID = environ['GCLOUD_PROJECT'] +PROJECT_ID = environ['GOOGLE_CLOUD_PROJECT'] SLEEP_TIME = 1 TRY_LIMIT = 20 diff --git a/dataflow/flex-templates/streaming_beam/streaming_beam_test.py b/dataflow/flex-templates/streaming_beam/streaming_beam_test.py index 762dc4f6be98..b2492d888884 100644 --- a/dataflow/flex-templates/streaming_beam/streaming_beam_test.py +++ b/dataflow/flex-templates/streaming_beam/streaming_beam_test.py @@ -22,7 +22,7 @@ import pytest -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] UUID = str(uuid.uuid4()).split('-')[0] DATASET = 'beam_samples_{}'.format(UUID) TABLE = 'streaming_beam_sql' diff --git a/dataflow/run_template/main_test.py b/dataflow/run_template/main_test.py index 9dc41c47201a..ec48ea9147bc 100644 --- a/dataflow/run_template/main_test.py +++ b/dataflow/run_template/main_test.py @@ -34,7 +34,7 @@ import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = os.environ['CLOUD_STORAGE_BUCKET'] dataflow = build('dataflow', 'v1b3') diff --git a/datalabeling/create_annotation_spec_set_test.py b/datalabeling/create_annotation_spec_set_test.py index 7972c7330d63..6ae5ee5d1b3c 100644 --- a/datalabeling/create_annotation_spec_set_test.py +++ b/datalabeling/create_annotation_spec_set_test.py @@ -24,7 +24,7 @@ import testing_lib -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') @pytest.fixture(scope='module') diff --git a/datalabeling/create_instruction_test.py b/datalabeling/create_instruction_test.py index 6bc7c875785d..b164da0c13ba 100644 --- a/datalabeling/create_instruction_test.py +++ b/datalabeling/create_instruction_test.py @@ -24,7 +24,7 @@ import testing_lib -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') INSTRUCTION_GCS_URI = ('gs://cloud-samples-data/datalabeling' '/instruction/test.pdf') diff --git a/datalabeling/import_data_test.py b/datalabeling/import_data_test.py index a2b8e5dad7ea..246cfba4b573 100644 --- a/datalabeling/import_data_test.py +++ b/datalabeling/import_data_test.py @@ -24,7 +24,7 @@ import testing_lib -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') INPUT_GCS_URI = 'gs://cloud-samples-data/datalabeling/image/image_dataset.csv' diff --git a/datalabeling/label_image_test.py b/datalabeling/label_image_test.py index d2d5e69784d9..a6feee42c1d8 100644 --- a/datalabeling/label_image_test.py +++ b/datalabeling/label_image_test.py @@ -24,7 +24,7 @@ import testing_lib -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') INPUT_GCS_URI = 'gs://cloud-samples-data/datalabeling/image/image_dataset.csv' INSTRUCTION_GCS_URI = ('gs://cloud-samples-data/datalabeling' '/instruction/test.pdf') diff --git a/datalabeling/label_text_test.py b/datalabeling/label_text_test.py index a189f99a03ba..c90024b97336 100644 --- a/datalabeling/label_text_test.py +++ b/datalabeling/label_text_test.py @@ -23,7 +23,7 @@ import label_text import testing_lib -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') INPUT_GCS_URI = 'gs://cloud-samples-data/datalabeling/text/input.csv' INSTRUCTION_GCS_URI = ('gs://cloud-samples-data/datalabeling' '/instruction/test.pdf') diff --git a/datalabeling/label_video_test.py b/datalabeling/label_video_test.py index e1c6f53b275d..05d3c5a3b124 100644 --- a/datalabeling/label_video_test.py +++ b/datalabeling/label_video_test.py @@ -23,7 +23,7 @@ import label_video import testing_lib -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') INPUT_GCS_URI = 'gs://cloud-samples-data/datalabeling/videos/video_dataset.csv' INSTRUCTION_GCS_URI = ('gs://cloud-samples-data/datalabeling' '/instruction/test.pdf') diff --git a/datalabeling/manage_dataset_test.py b/datalabeling/manage_dataset_test.py index 6699425ae61b..b6abc25829bb 100644 --- a/datalabeling/manage_dataset_test.py +++ b/datalabeling/manage_dataset_test.py @@ -25,7 +25,7 @@ import testing_lib -PROJECT_ID = os.getenv("GCLOUD_PROJECT") +PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT") @pytest.fixture(scope='module') diff --git a/dataproc/create_cluster_test.py b/dataproc/create_cluster_test.py index 6d815b5bc613..6b1d6806100e 100644 --- a/dataproc/create_cluster_test.py +++ b/dataproc/create_cluster_test.py @@ -21,7 +21,7 @@ import create_cluster -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] REGION = 'us-central1' CLUSTER_NAME = 'py-cc-test-{}'.format(str(uuid.uuid4())) diff --git a/dataproc/dataproc_e2e_donttest.py b/dataproc/dataproc_e2e_donttest.py index 0a45d080122f..44cc03bfd428 100644 --- a/dataproc/dataproc_e2e_donttest.py +++ b/dataproc/dataproc_e2e_donttest.py @@ -20,7 +20,7 @@ import submit_job_to_cluster -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = os.environ['CLOUD_STORAGE_BUCKET'] CLUSTER_NAME = 'testcluster3' ZONE = 'us-central1-b' diff --git a/dataproc/instantiate_inline_workflow_template_test.py b/dataproc/instantiate_inline_workflow_template_test.py index 6fe3711973b6..22673e4ee086 100644 --- a/dataproc/instantiate_inline_workflow_template_test.py +++ b/dataproc/instantiate_inline_workflow_template_test.py @@ -17,7 +17,7 @@ import instantiate_inline_workflow_template -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] REGION = 'us-central1' diff --git a/dataproc/quickstart/quickstart_test.py b/dataproc/quickstart/quickstart_test.py index 7788e0946349..3e17f6fa3e57 100644 --- a/dataproc/quickstart/quickstart_test.py +++ b/dataproc/quickstart/quickstart_test.py @@ -22,7 +22,7 @@ import quickstart -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] REGION = 'us-central1' CLUSTER_NAME = 'py-qs-test-{}'.format(str(uuid.uuid4())) STAGING_BUCKET = 'py-dataproc-qs-bucket-{}'.format(str(uuid.uuid4())) diff --git a/datastore/cloud-client/snippets_test.py b/datastore/cloud-client/snippets_test.py index 2bf43d338808..54f246a6aaa1 100644 --- a/datastore/cloud-client/snippets_test.py +++ b/datastore/cloud-client/snippets_test.py @@ -19,7 +19,7 @@ import snippets -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] class CleanupClient(datastore.Client): diff --git a/datastore/cloud-client/tasks_test.py b/datastore/cloud-client/tasks_test.py index 9537738753b1..4f392cd53120 100644 --- a/datastore/cloud-client/tasks_test.py +++ b/datastore/cloud-client/tasks_test.py @@ -19,7 +19,7 @@ import tasks -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.yield_fixture diff --git a/dialogflow/cloud-client/create_document_test.py b/dialogflow/cloud-client/create_document_test.py index d6474a422552..441996ba9fd5 100644 --- a/dialogflow/cloud-client/create_document_test.py +++ b/dialogflow/cloud-client/create_document_test.py @@ -22,7 +22,7 @@ import document_management -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') KNOWLEDGE_BASE_NAME = 'knowledge_{}'.format(uuid.uuid4()) DOCUMENT_DISPLAY_NAME = 'test_document_{}'.format(uuid.uuid4()) pytest.KNOWLEDGE_BASE_ID = None diff --git a/dialogflow/cloud-client/create_knowledge_base_test.py b/dialogflow/cloud-client/create_knowledge_base_test.py index b605edfda41b..2230099beb01 100644 --- a/dialogflow/cloud-client/create_knowledge_base_test.py +++ b/dialogflow/cloud-client/create_knowledge_base_test.py @@ -22,7 +22,7 @@ import knowledge_base_management -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') KNOWLEDGE_BASE_NAME = 'knowledge_{}'.format(uuid.uuid4()) pytest.KNOWLEDGE_BASE_ID = None diff --git a/dialogflow/cloud-client/detect_intent_audio_test.py b/dialogflow/cloud-client/detect_intent_audio_test.py index 75829a4ac882..a4814aa9e2db 100644 --- a/dialogflow/cloud-client/detect_intent_audio_test.py +++ b/dialogflow/cloud-client/detect_intent_audio_test.py @@ -19,7 +19,7 @@ from detect_intent_audio import detect_intent_audio DIRNAME = os.path.realpath(os.path.dirname(__file__)) -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') SESSION_ID = 'test_{}'.format(uuid.uuid4()) AUDIOS = [ '{0}/resources/book_a_room.wav'.format(DIRNAME), diff --git a/dialogflow/cloud-client/detect_intent_knowledge_test.py b/dialogflow/cloud-client/detect_intent_knowledge_test.py index 772f13b87dbb..63864aec108c 100644 --- a/dialogflow/cloud-client/detect_intent_knowledge_test.py +++ b/dialogflow/cloud-client/detect_intent_knowledge_test.py @@ -19,7 +19,7 @@ import detect_intent_knowledge -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') SESSION_ID = 'session_{}'.format(uuid.uuid4()) KNOWLEDGE_BASE_ID = 'MjEwMjE4MDQ3MDQwMDc0NTQ3Mg' TEXTS = ['Where is my data stored?'] diff --git a/dialogflow/cloud-client/detect_intent_stream_test.py b/dialogflow/cloud-client/detect_intent_stream_test.py index d0127e0cf764..9659308c3345 100644 --- a/dialogflow/cloud-client/detect_intent_stream_test.py +++ b/dialogflow/cloud-client/detect_intent_stream_test.py @@ -18,7 +18,7 @@ from detect_intent_stream import detect_intent_stream -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') SESSION_ID = 'test_{}'.format(uuid.uuid4()) AUDIO_FILE_PATH = '{0}/resources/book_a_room.wav'.format( os.path.realpath(os.path.dirname(__file__)), diff --git a/dialogflow/cloud-client/detect_intent_texts_test.py b/dialogflow/cloud-client/detect_intent_texts_test.py index 11c65f7a6191..45404b667c46 100644 --- a/dialogflow/cloud-client/detect_intent_texts_test.py +++ b/dialogflow/cloud-client/detect_intent_texts_test.py @@ -18,7 +18,7 @@ from detect_intent_texts import detect_intent_texts -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') SESSION_ID = 'test_{}'.format(uuid.uuid4()) TEXTS = ["hello", "book a meeting room", "Mountain View", "tomorrow", "10 AM", "2 hours", "10 people", "A", "yes"] diff --git a/dialogflow/cloud-client/detect_intent_with_sentiment_analysis_test.py b/dialogflow/cloud-client/detect_intent_with_sentiment_analysis_test.py index 1cea1ac82802..71d85ae13e2a 100644 --- a/dialogflow/cloud-client/detect_intent_with_sentiment_analysis_test.py +++ b/dialogflow/cloud-client/detect_intent_with_sentiment_analysis_test.py @@ -19,7 +19,7 @@ from detect_intent_with_sentiment_analysis import \ detect_intent_with_sentiment_analysis -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') SESSION_ID = 'test_{}'.format(uuid.uuid4()) TEXTS = ["hello", "book a meeting room", "Mountain View", "tomorrow", "10 AM", "2 hours", "10 people", "A", "yes"] diff --git a/dialogflow/cloud-client/detect_intent_with_texttospeech_response_test.py b/dialogflow/cloud-client/detect_intent_with_texttospeech_response_test.py index ba62f4769248..adb904a6d63a 100644 --- a/dialogflow/cloud-client/detect_intent_with_texttospeech_response_test.py +++ b/dialogflow/cloud-client/detect_intent_with_texttospeech_response_test.py @@ -19,7 +19,7 @@ from detect_intent_with_texttospeech_response import \ detect_intent_with_texttospeech_response -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') SESSION_ID = 'test_{}'.format(uuid.uuid4()) TEXTS = ["hello"] diff --git a/dialogflow/cloud-client/intent_management_test.py b/dialogflow/cloud-client/intent_management_test.py index 8711de5b3379..f1e5b3e8b26a 100644 --- a/dialogflow/cloud-client/intent_management_test.py +++ b/dialogflow/cloud-client/intent_management_test.py @@ -19,7 +19,7 @@ import intent_management -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') INTENT_DISPLAY_NAME = 'test_{}'.format(uuid.uuid4()) MESSAGE_TEXTS = [ 'fake_message_text_for_testing_1', diff --git a/dlp/deid_test.py b/dlp/deid_test.py index 8aa130be0eae..3b0f4dd5b0e9 100644 --- a/dlp/deid_test.py +++ b/dlp/deid_test.py @@ -22,7 +22,7 @@ HARMFUL_STRING = "My SSN is 372819127" HARMLESS_STRING = "My favorite color is blue" -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") WRAPPED_KEY = ( "CiQAz0hX4+go8fJwn80Fr8pVImwx+tmZdqU7JL+7TN/S5JxBU9gSSQDhFHpFVy" "uzJps0YH9ls480mU+JLG7jI/0lL04i6XJRWqmI6gUSZRUtECYcLH5gXK4SXHlL" diff --git a/dlp/inspect_content.py b/dlp/inspect_content.py index 1c5f9c4df958..7d69fa7e05d4 100644 --- a/dlp/inspect_content.py +++ b/dlp/inspect_content.py @@ -861,7 +861,7 @@ def callback(message): if __name__ == "__main__": - default_project = os.environ.get("GCLOUD_PROJECT") + default_project = os.environ.get("GOOGLE_CLOUD_PROJECT") parser = argparse.ArgumentParser(description=__doc__) subparsers = parser.add_subparsers( diff --git a/dlp/inspect_content_test.py b/dlp/inspect_content_test.py index cbf4476f5473..e211083b8b22 100644 --- a/dlp/inspect_content_test.py +++ b/dlp/inspect_content_test.py @@ -29,7 +29,7 @@ UNIQUE_STRING = str(uuid.uuid4()).split("-")[0] -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") TEST_BUCKET_NAME = GCLOUD_PROJECT + "-dlp-python-client-test" + UNIQUE_STRING RESOURCE_DIRECTORY = os.path.join(os.path.dirname(__file__), "resources") RESOURCE_FILE_NAMES = ["test.txt", "test.png", "harmless.txt", "accounts.txt"] diff --git a/dlp/jobs_test.py b/dlp/jobs_test.py index b3910dd5b330..89997bc5097c 100644 --- a/dlp/jobs_test.py +++ b/dlp/jobs_test.py @@ -19,7 +19,7 @@ import jobs -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") TEST_COLUMN_NAME = "zip_code" TEST_TABLE_PROJECT_ID = "bigquery-public-data" TEST_DATASET_ID = "san_francisco" diff --git a/dlp/quickstart_test.py b/dlp/quickstart_test.py index 72ddd2978030..1814497c1660 100644 --- a/dlp/quickstart_test.py +++ b/dlp/quickstart_test.py @@ -20,7 +20,7 @@ import quickstart -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") def test_quickstart(capsys): diff --git a/dlp/redact.py b/dlp/redact.py index ad1d866d6d63..66072de7b282 100644 --- a/dlp/redact.py +++ b/dlp/redact.py @@ -123,7 +123,7 @@ def redact_image( if __name__ == "__main__": - default_project = os.environ.get("GCLOUD_PROJECT") + default_project = os.environ.get("GOOGLE_CLOUD_PROJECT") parser = argparse.ArgumentParser(description=__doc__) diff --git a/dlp/redact_test.py b/dlp/redact_test.py index dd9a887d23d0..cb3740353b5b 100644 --- a/dlp/redact_test.py +++ b/dlp/redact_test.py @@ -20,7 +20,7 @@ import redact -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") RESOURCE_DIRECTORY = os.path.join(os.path.dirname(__file__), "resources") diff --git a/dlp/risk_test.py b/dlp/risk_test.py index 9a53c835c46b..b9fc6c68337a 100644 --- a/dlp/risk_test.py +++ b/dlp/risk_test.py @@ -23,8 +23,8 @@ UNIQUE_STRING = str(uuid.uuid4()).split("-")[0] -GCLOUD_PROJECT = os.environ.get("GCLOUD_PROJECT") -TABLE_PROJECT = os.environ.get("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.environ.get("GOOGLE_CLOUD_PROJECT") +TABLE_PROJECT = os.environ.get("GOOGLE_CLOUD_PROJECT") TOPIC_ID = "dlp-test" + UNIQUE_STRING SUBSCRIPTION_ID = "dlp-test-subscription" + UNIQUE_STRING UNIQUE_FIELD = "Name" diff --git a/dlp/templates.py b/dlp/templates.py index 5f03b596fc3f..2d9f8137d5d1 100644 --- a/dlp/templates.py +++ b/dlp/templates.py @@ -174,7 +174,7 @@ def delete_inspect_template(project, template_id): if __name__ == "__main__": - default_project = os.environ.get("GCLOUD_PROJECT") + default_project = os.environ.get("GOOGLE_CLOUD_PROJECT") parser = argparse.ArgumentParser(description=__doc__) subparsers = parser.add_subparsers( diff --git a/dlp/templates_test.py b/dlp/templates_test.py index 8ecf8542db6e..f8d22118bfcd 100644 --- a/dlp/templates_test.py +++ b/dlp/templates_test.py @@ -21,7 +21,7 @@ import templates UNIQUE_STRING = str(uuid.uuid4()).split("-")[0] -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") TEST_TEMPLATE_ID = "test-template" + UNIQUE_STRING diff --git a/dlp/triggers.py b/dlp/triggers.py index 0c2b0bb4e295..7548ab893db8 100644 --- a/dlp/triggers.py +++ b/dlp/triggers.py @@ -193,7 +193,7 @@ def delete_trigger(project, trigger_id): if __name__ == "__main__": - default_project = os.environ.get("GCLOUD_PROJECT") + default_project = os.environ.get("GOOGLE_CLOUD_PROJECT") parser = argparse.ArgumentParser(description=__doc__) subparsers = parser.add_subparsers( diff --git a/dlp/triggers_test.py b/dlp/triggers_test.py index 9ecf92e9a37a..dc219d88c7a9 100644 --- a/dlp/triggers_test.py +++ b/dlp/triggers_test.py @@ -23,7 +23,7 @@ import triggers UNIQUE_STRING = str(uuid.uuid4()).split("-")[0] -GCLOUD_PROJECT = os.getenv("GCLOUD_PROJECT") +GCLOUD_PROJECT = os.getenv("GOOGLE_CLOUD_PROJECT") TEST_BUCKET_NAME = GCLOUD_PROJECT + "-dlp-python-client-test" + UNIQUE_STRING RESOURCE_DIRECTORY = os.path.join(os.path.dirname(__file__), "resources") RESOURCE_FILE_NAMES = ["test.txt", "test.png", "harmless.txt", "accounts.txt"] diff --git a/dns/api/main_test.py b/dns/api/main_test.py index 5b7a8b77292b..1fd05e5ec949 100644 --- a/dns/api/main_test.py +++ b/dns/api/main_test.py @@ -22,7 +22,7 @@ import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] TEST_ZONE_NAME = 'test-zone' + str(uuid.uuid4()) TEST_ZONE_DNS_NAME = 'theadora.is.' TEST_ZONE_DESCRIPTION = 'Test zone' diff --git a/document/cloud-client/batch_parse_form_beta_test.py b/document/cloud-client/batch_parse_form_beta_test.py index d00a03bc821b..435a4f4e99da 100644 --- a/document/cloud-client/batch_parse_form_beta_test.py +++ b/document/cloud-client/batch_parse_form_beta_test.py @@ -23,7 +23,7 @@ BUCKET = 'document-ai-{}'.format(uuid.uuid4()) OUTPUT_PREFIX = 'TEST_OUTPUT_{}'.format(uuid.uuid4()) -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf' BATCH_OUTPUT_URI = 'gs://{}/{}/'.format(BUCKET, OUTPUT_PREFIX) diff --git a/document/cloud-client/batch_parse_table_beta_test.py b/document/cloud-client/batch_parse_table_beta_test.py index 02d2c46743fc..923875d200d2 100644 --- a/document/cloud-client/batch_parse_table_beta_test.py +++ b/document/cloud-client/batch_parse_table_beta_test.py @@ -23,7 +23,7 @@ BUCKET = 'document-ai-{}'.format(uuid.uuid4()) OUTPUT_PREFIX = 'TEST_OUTPUT_{}'.format(uuid.uuid4()) -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf' BATCH_OUTPUT_URI = 'gs://{}/{}/'.format(BUCKET, OUTPUT_PREFIX) diff --git a/document/cloud-client/parse_form_beta_test.py b/document/cloud-client/parse_form_beta_test.py index d955aaf71c8c..e5948bd3c15e 100644 --- a/document/cloud-client/parse_form_beta_test.py +++ b/document/cloud-client/parse_form_beta_test.py @@ -17,7 +17,7 @@ import parse_form_beta -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/form.pdf' diff --git a/document/cloud-client/parse_table_beta_test.py b/document/cloud-client/parse_table_beta_test.py index 8bfbac27dfec..28bdb534a36a 100644 --- a/document/cloud-client/parse_table_beta_test.py +++ b/document/cloud-client/parse_table_beta_test.py @@ -17,7 +17,7 @@ import parse_table_beta -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf' diff --git a/document/cloud-client/parse_with_model_beta_test.py b/document/cloud-client/parse_with_model_beta_test.py index fbce3391212b..25d40d8b9b29 100644 --- a/document/cloud-client/parse_with_model_beta_test.py +++ b/document/cloud-client/parse_with_model_beta_test.py @@ -17,7 +17,7 @@ import parse_with_model_beta -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf' AUTOML_NL_MODEL_ID = 'TCN3472481026502981088' diff --git a/document/cloud-client/quickstart_beta_test.py b/document/cloud-client/quickstart_beta_test.py index 2e359599c733..7fb632f97f8b 100644 --- a/document/cloud-client/quickstart_beta_test.py +++ b/document/cloud-client/quickstart_beta_test.py @@ -17,7 +17,7 @@ import quickstart_beta -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf' diff --git a/document/cloud-client/set_endpoint_beta_test.py b/document/cloud-client/set_endpoint_beta_test.py index 8484c855e970..b078270a0baa 100644 --- a/document/cloud-client/set_endpoint_beta_test.py +++ b/document/cloud-client/set_endpoint_beta_test.py @@ -17,7 +17,7 @@ import set_endpoint_beta -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf' diff --git a/functions/bigtable/main_test.py b/functions/bigtable/main_test.py index 718a88a76983..c53b0d4babe6 100644 --- a/functions/bigtable/main_test.py +++ b/functions/bigtable/main_test.py @@ -22,7 +22,7 @@ import main -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BIGTABLE_INSTANCE = os.environ['BIGTABLE_INSTANCE'] TABLE_ID_PREFIX = 'mobile-time-series-{}' diff --git a/functions/http/main_test.py b/functions/http/main_test.py index cc1600bd973a..af97bcbafd61 100644 --- a/functions/http/main_test.py +++ b/functions/http/main_test.py @@ -51,7 +51,7 @@ def test_parse_multipart_files(app, capsys): def test_get_signed_url(app, capsys): json = { - 'bucket': os.getenv('GCLOUD_PROJECT'), + 'bucket': os.getenv('GOOGLE_CLOUD_PROJECT'), 'filename': 'test.txt', 'contentType': 'text/plain' } diff --git a/functions/ocr/app/noxfile_config.py b/functions/ocr/app/noxfile_config.py index 632d069225c9..6e9979617bd9 100644 --- a/functions/ocr/app/noxfile_config.py +++ b/functions/ocr/app/noxfile_config.py @@ -33,7 +33,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/healthcare/api-client/fhir/fhir_resources_test.py b/healthcare/api-client/fhir/fhir_resources_test.py index 605ede8a124c..18a5c9b82ec2 100644 --- a/healthcare/api-client/fhir/fhir_resources_test.py +++ b/healthcare/api-client/fhir/fhir_resources_test.py @@ -29,7 +29,7 @@ cloud_region = "us-central1" base_url = "https://healthcare.googleapis.com/v1beta1" -project_id = os.environ["GCLOUD_PROJECT"] +project_id = os.environ["GOOGLE_CLOUD_PROJECT"] service_account_json = os.environ["GOOGLE_APPLICATION_CREDENTIALS"] bundle = os.path.join(os.path.dirname(__file__), "resources/execute_bundle.json") diff --git a/iam/api-client/access_test.py b/iam/api-client/access_test.py index 7df4d8a113ad..5d8325de1936 100644 --- a/iam/api-client/access_test.py +++ b/iam/api-client/access_test.py @@ -24,7 +24,7 @@ # Setting up variables for testing -GCLOUD_PROJECT = os.environ["GCLOUD_PROJECT"] +GCLOUD_PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] # specifying a sample role to be assigned GCP_ROLE = "roles/owner" diff --git a/iam/api-client/custom_roles_test.py b/iam/api-client/custom_roles_test.py index 5d2252235434..ad8fed0361ad 100644 --- a/iam/api-client/custom_roles_test.py +++ b/iam/api-client/custom_roles_test.py @@ -21,7 +21,7 @@ import custom_roles -GCLOUD_PROJECT = os.environ["GCLOUD_PROJECT"] +GCLOUD_PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] CUSTOM_ROLE_NAME = "pythonTestCustomRole" CUSTOM_ROLE_TITLE = "Python Test Custom Role" diff --git a/iam/api-client/grantable_roles_test.py b/iam/api-client/grantable_roles_test.py index 87af3564b930..50c07cfd9d20 100644 --- a/iam/api-client/grantable_roles_test.py +++ b/iam/api-client/grantable_roles_test.py @@ -18,7 +18,7 @@ def test_service_accounts(capsys): - project = os.environ['GCLOUD_PROJECT'] + project = os.environ['GOOGLE_CLOUD_PROJECT'] resource = '//cloudresourcemanager.googleapis.com/projects/' + project grantable_roles.view_grantable_roles(resource) out, _ = capsys.readouterr() diff --git a/iam/api-client/noxfile_config.py b/iam/api-client/noxfile_config.py index 6dc471102c62..664c58309d70 100644 --- a/iam/api-client/noxfile_config.py +++ b/iam/api-client/noxfile_config.py @@ -33,7 +33,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - # 'gcloud_project_env': 'GCLOUD_PROJECT', + # 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/iam/api-client/service_accounts_test.py b/iam/api-client/service_accounts_test.py index 842f15193f2d..4c1884ad04ab 100644 --- a/iam/api-client/service_accounts_test.py +++ b/iam/api-client/service_accounts_test.py @@ -21,7 +21,7 @@ def test_service_accounts(capsys): - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] name = 'python-test-{}'.format(str(uuid.uuid4()).split('-')[0]) email = name + '@' + project_id + '.iam.gserviceaccount.com' diff --git a/iot/api-client/end_to_end_example/cloudiot_pubsub_example_server_test.py b/iot/api-client/end_to_end_example/cloudiot_pubsub_example_server_test.py index 097cdaa86378..9214e99c7183 100644 --- a/iot/api-client/end_to_end_example/cloudiot_pubsub_example_server_test.py +++ b/iot/api-client/end_to_end_example/cloudiot_pubsub_example_server_test.py @@ -22,7 +22,7 @@ device_id_template = 'test-device-{}' topic_id = 'test-device-events-{}'.format(int(time.time())) -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] pubsub_topic = 'projects/{}/topics/{}'.format(project_id, topic_id) diff --git a/iot/api-client/gcs_file_to_device/gcs_example_mqtt_device_test.py b/iot/api-client/gcs_file_to_device/gcs_example_mqtt_device_test.py index 8cc84d084537..e0c2df71e0d6 100644 --- a/iot/api-client/gcs_file_to_device/gcs_example_mqtt_device_test.py +++ b/iot/api-client/gcs_file_to_device/gcs_example_mqtt_device_test.py @@ -23,7 +23,7 @@ gcs_bucket = os.environ['CLOUD_STORAGE_BUCKET'] cloud_region = 'us-central1' -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture(scope='module') diff --git a/iot/api-client/gcs_file_to_device/gcs_send_to_device_test.py b/iot/api-client/gcs_file_to_device/gcs_send_to_device_test.py index 71d954b7e8cb..d41a73619aa3 100644 --- a/iot/api-client/gcs_file_to_device/gcs_send_to_device_test.py +++ b/iot/api-client/gcs_file_to_device/gcs_send_to_device_test.py @@ -32,7 +32,7 @@ gcs_bucket = os.environ['CLOUD_STORAGE_BUCKET'] -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] topic_id = 'test-device-events-{}'.format(str(uuid.uuid4())) diff --git a/iot/api-client/http_example/cloudiot_http_example_test.py b/iot/api-client/http_example/cloudiot_http_example_test.py index 067547ed5261..35a1eb565274 100644 --- a/iot/api-client/http_example/cloudiot_http_example_test.py +++ b/iot/api-client/http_example/cloudiot_http_example_test.py @@ -33,7 +33,7 @@ rsa_private_path = 'resources/rsa_private.pem' topic_id = 'test-device-events-{}'.format(int(time.time())) -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] pubsub_topic = 'projects/{}/topics/{}'.format(project_id, topic_id) diff --git a/iot/api-client/manager/manager_test.py b/iot/api-client/manager/manager_test.py index 7291e1f35234..7cb3378d0a08 100644 --- a/iot/api-client/manager/manager_test.py +++ b/iot/api-client/manager/manager_test.py @@ -35,7 +35,7 @@ rsa_private_path = 'resources/rsa_private.pem' # Must match rsa_cert topic_id = 'test-device-events-{}'.format(uuid.uuid4()) -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] pubsub_topic = 'projects/{}/topics/{}'.format(project_id, topic_id) diff --git a/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py b/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py index 743c9a5593ae..7b42574287ff 100644 --- a/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py +++ b/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py @@ -31,7 +31,7 @@ cloud_region = 'us-central1' ca_cert_path = 'resources/roots.pem' rsa_private_path = 'resources/rsa_private.pem' -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] mqtt_bridge_hostname = 'mqtt.googleapis.com' diff --git a/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py b/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py index ec473fbd4148..cb68108e402d 100644 --- a/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py +++ b/iot/api-client/mqtt_example/cloudiot_mqtt_image_test.py @@ -29,7 +29,7 @@ cloud_region = 'us-central1' ca_cert_path = 'resources/roots.pem' rsa_private_path = 'resources/rsa_private.pem' -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] image_path = './resources/owlister_hootie.png' diff --git a/iot/api-client/mqtt_example/fixtures.py b/iot/api-client/mqtt_example/fixtures.py index 65196e8023e6..3f7646a8a611 100644 --- a/iot/api-client/mqtt_example/fixtures.py +++ b/iot/api-client/mqtt_example/fixtures.py @@ -34,7 +34,7 @@ rsa_cert_path = 'resources/rsa_cert.pem' topic_id = 'test-device-events-{}'.format(uuid.uuid4()) subscription_name = 'test-device-images-{}'.format(uuid.uuid4()) -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] registry_id = 'test-registry-{}-{}'.format(uuid.uuid4().hex, int(time.time())) diff --git a/iot/api-client/mqtt_example/gateway_demo.py b/iot/api-client/mqtt_example/gateway_demo.py index 61c4311e3ebd..b8914d739ddb 100644 --- a/iot/api-client/mqtt_example/gateway_demo.py +++ b/iot/api-client/mqtt_example/gateway_demo.py @@ -37,13 +37,13 @@ rsa_cert_path = 'resources/rsa_cert.pem' rsa_private_path = 'resources/rsa_private.pem' -if ('GCLOUD_PROJECT' not in os.environ or +if ('GOOGLE_CLOUD_PROJECT' not in os.environ or 'GOOGLE_APPLICATION_CREDENTIALS' not in os.environ): print( 'You must set GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS') quit() -project_id = os.environ['GCLOUD_PROJECT'] +project_id = os.environ['GOOGLE_CLOUD_PROJECT'] service_account_json = os.environ['GOOGLE_APPLICATION_CREDENTIALS'] pubsub_topic = 'projects/{}/topics/{}'.format(project_id, topic_id) diff --git a/jobs/v3/api_client/noxfile_config.py b/jobs/v3/api_client/noxfile_config.py index 950c3a070bd0..cfd0d439150c 100644 --- a/jobs/v3/api_client/noxfile_config.py +++ b/jobs/v3/api_client/noxfile_config.py @@ -28,7 +28,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - # 'gcloud_project_env': 'GCLOUD_PROJECT', + # 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/kms/api-client/snippets_test.py b/kms/api-client/snippets_test.py index 795edeb47370..e7705cc99084 100644 --- a/kms/api-client/snippets_test.py +++ b/kms/api-client/snippets_test.py @@ -64,7 +64,7 @@ def client(): @pytest.fixture(scope="module") def project_id(): - return os.environ['GCLOUD_PROJECT'] + return os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture(scope="module") diff --git a/kubernetes_engine/api-client/snippets_test.py b/kubernetes_engine/api-client/snippets_test.py index dc741d6e8015..8fb1de07588d 100644 --- a/kubernetes_engine/api-client/snippets_test.py +++ b/kubernetes_engine/api-client/snippets_test.py @@ -18,5 +18,5 @@ def test_list_clusters_and_nodepools(): - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] snippets.list_clusters_and_nodepools(project_id, 'us-central1-f') diff --git a/monitoring/api/v3/alerts-client/noxfile_config.py b/monitoring/api/v3/alerts-client/noxfile_config.py index 6dc471102c62..664c58309d70 100644 --- a/monitoring/api/v3/alerts-client/noxfile_config.py +++ b/monitoring/api/v3/alerts-client/noxfile_config.py @@ -33,7 +33,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - # 'gcloud_project_env': 'GCLOUD_PROJECT', + # 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/monitoring/api/v3/alerts-client/snippets.py b/monitoring/api/v3/alerts-client/snippets.py index c56c2fcab207..80254232e6af 100644 --- a/monitoring/api/v3/alerts-client/snippets.py +++ b/monitoring/api/v3/alerts-client/snippets.py @@ -239,7 +239,7 @@ def project_id(): Returns: str -- the project name """ - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] if not project_id: raise MissingProjectIdError( diff --git a/monitoring/api/v3/api-client/custom_metric_test.py b/monitoring/api/v3/api-client/custom_metric_test.py index e2daa0964139..5cb4ce1cf9cf 100644 --- a/monitoring/api/v3/api-client/custom_metric_test.py +++ b/monitoring/api/v3/api-client/custom_metric_test.py @@ -37,7 +37,7 @@ from custom_metric import write_timeseries_value -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] PROJECT_RESOURCE = "projects/{}".format(PROJECT) """ Custom metric domain for all custom metrics""" diff --git a/monitoring/api/v3/api-client/list_resources_test.py b/monitoring/api/v3/api-client/list_resources_test.py index fba988e9a7db..deb17a27bb91 100644 --- a/monitoring/api/v3/api-client/list_resources_test.py +++ b/monitoring/api/v3/api-client/list_resources_test.py @@ -28,7 +28,7 @@ import list_resources -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] METRIC = 'compute.googleapis.com/instance/cpu/usage_time' diff --git a/monitoring/api/v3/cloud-client/noxfile_config.py b/monitoring/api/v3/cloud-client/noxfile_config.py index 6dc471102c62..664c58309d70 100644 --- a/monitoring/api/v3/cloud-client/noxfile_config.py +++ b/monitoring/api/v3/cloud-client/noxfile_config.py @@ -33,7 +33,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - # 'gcloud_project_env': 'GCLOUD_PROJECT', + # 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/monitoring/api/v3/cloud-client/quickstart_test.py b/monitoring/api/v3/cloud-client/quickstart_test.py index 045ef3c443f5..fd0191aafc12 100644 --- a/monitoring/api/v3/cloud-client/quickstart_test.py +++ b/monitoring/api/v3/cloud-client/quickstart_test.py @@ -21,7 +21,7 @@ import quickstart -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture diff --git a/monitoring/api/v3/cloud-client/snippets.py b/monitoring/api/v3/cloud-client/snippets.py index be77ca720c26..64b3853fd7cc 100644 --- a/monitoring/api/v3/cloud-client/snippets.py +++ b/monitoring/api/v3/cloud-client/snippets.py @@ -21,7 +21,7 @@ from google.cloud import monitoring_v3 -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] def create_metric_descriptor(project_id): diff --git a/monitoring/api/v3/cloud-client/snippets_test.py b/monitoring/api/v3/cloud-client/snippets_test.py index 18bb7bf58209..23e457cd2572 100644 --- a/monitoring/api/v3/cloud-client/snippets_test.py +++ b/monitoring/api/v3/cloud-client/snippets_test.py @@ -22,7 +22,7 @@ import snippets -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture(scope="function") diff --git a/monitoring/api/v3/uptime-check-client/snippets.py b/monitoring/api/v3/uptime-check-client/snippets.py index 8298636ed7b4..1095300ccb05 100644 --- a/monitoring/api/v3/uptime-check-client/snippets.py +++ b/monitoring/api/v3/uptime-check-client/snippets.py @@ -109,7 +109,7 @@ def project_id(): Returns: str -- the project name """ - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] if not project_id: raise MissingProjectIdError( diff --git a/noxfile-template.py b/noxfile-template.py index b23055f14a65..a398d2e5a5ad 100644 --- a/noxfile-template.py +++ b/noxfile-template.py @@ -43,7 +43,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any @@ -72,7 +72,7 @@ def get_pytest_env_vars(): env_key = TEST_CONFIG['gcloud_project_env'] # This should error out if not set. ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] - ret['GCLOUD_PROJECT'] = os.environ[env_key] + ret['GCLOUD_PROJECT'] = os.environ[env_key] # deprecated # Apply user supplied envs. ret.update(TEST_CONFIG['envs']) diff --git a/noxfile_config.py b/noxfile_config.py index 6f358b8db3af..b31cadd9b7fd 100644 --- a/noxfile_config.py +++ b/noxfile_config.py @@ -28,7 +28,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/pubsub/cloud-client/iam_test.py b/pubsub/cloud-client/iam_test.py index 31764a056e8d..d196953f6207 100644 --- a/pubsub/cloud-client/iam_test.py +++ b/pubsub/cloud-client/iam_test.py @@ -21,7 +21,7 @@ import iam UUID = uuid.uuid4().hex -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] TOPIC = "iam-test-topic-" + UUID SUBSCRIPTION = "iam-test-subscription-" + UUID diff --git a/pubsub/cloud-client/publisher_test.py b/pubsub/cloud-client/publisher_test.py index dc6095508112..b5c2ea1ea4b5 100644 --- a/pubsub/cloud-client/publisher_test.py +++ b/pubsub/cloud-client/publisher_test.py @@ -24,7 +24,7 @@ import publisher UUID = uuid.uuid4().hex -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] TOPIC_ADMIN = "publisher-test-topic-admin-" + UUID TOPIC_PUBLISH = "publisher-test-topic-publish-" + UUID diff --git a/pubsub/cloud-client/quickstart/pub_test.py b/pubsub/cloud-client/quickstart/pub_test.py index 24010c76e830..6f5cc06c4456 100644 --- a/pubsub/cloud-client/quickstart/pub_test.py +++ b/pubsub/cloud-client/quickstart/pub_test.py @@ -25,7 +25,7 @@ UUID = uuid.uuid4().hex -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] TOPIC = "quickstart-pub-test-topic-" + UUID diff --git a/pubsub/cloud-client/quickstart/sub_test.py b/pubsub/cloud-client/quickstart/sub_test.py index 65d5fa111a05..38047422a935 100644 --- a/pubsub/cloud-client/quickstart/sub_test.py +++ b/pubsub/cloud-client/quickstart/sub_test.py @@ -25,7 +25,7 @@ UUID = uuid.uuid4().hex -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] TOPIC = "quickstart-sub-test-topic-" + UUID SUBSCRIPTION = "quickstart-sub-test-topic-sub-" + UUID diff --git a/pubsub/cloud-client/subscriber_test.py b/pubsub/cloud-client/subscriber_test.py index 6b90396f942e..a7f7c139c258 100644 --- a/pubsub/cloud-client/subscriber_test.py +++ b/pubsub/cloud-client/subscriber_test.py @@ -22,7 +22,7 @@ import subscriber UUID = uuid.uuid4().hex -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] TOPIC = "subscription-test-topic-" + UUID DEAD_LETTER_TOPIC = "subscription-test-dead-letter-topic-" + UUID SUBSCRIPTION_ADMIN = "subscription-test-subscription-admin-" + UUID diff --git a/pubsub/streaming-analytics/PubSubToGCS_test.py b/pubsub/streaming-analytics/PubSubToGCS_test.py index 9dc04b341cab..80de8f89b403 100644 --- a/pubsub/streaming-analytics/PubSubToGCS_test.py +++ b/pubsub/streaming-analytics/PubSubToGCS_test.py @@ -24,7 +24,7 @@ import PubSubToGCS -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] BUCKET = os.environ["CLOUD_STORAGE_BUCKET"] UUID = uuid.uuid1().hex diff --git a/run/markdown-preview/editor/noxfile.py b/run/markdown-preview/editor/noxfile.py index b23055f14a65..a398d2e5a5ad 100644 --- a/run/markdown-preview/editor/noxfile.py +++ b/run/markdown-preview/editor/noxfile.py @@ -43,7 +43,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any @@ -72,7 +72,7 @@ def get_pytest_env_vars(): env_key = TEST_CONFIG['gcloud_project_env'] # This should error out if not set. ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] - ret['GCLOUD_PROJECT'] = os.environ[env_key] + ret['GCLOUD_PROJECT'] = os.environ[env_key] # deprecated # Apply user supplied envs. ret.update(TEST_CONFIG['envs']) diff --git a/run/markdown-preview/noxfile_config.py b/run/markdown-preview/noxfile_config.py index 3b544da5c981..0543aa954c5b 100644 --- a/run/markdown-preview/noxfile_config.py +++ b/run/markdown-preview/noxfile_config.py @@ -30,7 +30,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/run/markdown-preview/renderer/noxfile.py b/run/markdown-preview/renderer/noxfile.py index b23055f14a65..281860e1393c 100644 --- a/run/markdown-preview/renderer/noxfile.py +++ b/run/markdown-preview/renderer/noxfile.py @@ -43,7 +43,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/run/system-package/noxfile_config.py b/run/system-package/noxfile_config.py index 3b544da5c981..0543aa954c5b 100644 --- a/run/system-package/noxfile_config.py +++ b/run/system-package/noxfile_config.py @@ -30,7 +30,7 @@ # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GCLOUD_PROJECT', + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # A dictionary you want to inject into your test. Don't put any diff --git a/scheduler/create_job_test.py b/scheduler/create_job_test.py index ab03c1b7629d..e6b8a0eb719b 100644 --- a/scheduler/create_job_test.py +++ b/scheduler/create_job_test.py @@ -16,7 +16,7 @@ import create_job -TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT') +TEST_PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') TEST_LOCATION = os.getenv('LOCATION_ID', 'us-central1') diff --git a/secretmanager/api-client/snippets_test.py b/secretmanager/api-client/snippets_test.py index 2c16c139d64f..65f93be6b0f6 100644 --- a/secretmanager/api-client/snippets_test.py +++ b/secretmanager/api-client/snippets_test.py @@ -42,7 +42,7 @@ def client(): @pytest.fixture() def project_id(): - return os.environ['GCLOUD_PROJECT'] + return os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture() diff --git a/storage/cloud-client/requester_pays_test.py b/storage/cloud-client/requester_pays_test.py index 7511be739b3f..9f85c6bdb200 100644 --- a/storage/cloud-client/requester_pays_test.py +++ b/storage/cloud-client/requester_pays_test.py @@ -26,7 +26,7 @@ # We use a different bucket from other tests. BUCKET = os.environ["REQUESTER_PAYS_TEST_BUCKET"] -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] def test_enable_requester_pays(capsys): diff --git a/tables/automl/dataset_test.py b/tables/automl/dataset_test.py index ea25c3f1afc6..7b19141ef724 100644 --- a/tables/automl/dataset_test.py +++ b/tables/automl/dataset_test.py @@ -24,7 +24,7 @@ import automl_tables_dataset -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] REGION = "us-central1" STATIC_DATASET = "do_not_delete_this_table" GCS_DATASET = "gs://cloud-ml-tables-data/bank-marketing.csv" diff --git a/tables/automl/endpoint_test.py b/tables/automl/endpoint_test.py index b556a4c9827c..5a20aba5c488 100644 --- a/tables/automl/endpoint_test.py +++ b/tables/automl/endpoint_test.py @@ -17,7 +17,7 @@ import automl_tables_set_endpoint -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] def test_client_creation(capsys): diff --git a/tables/automl/model_test.py b/tables/automl/model_test.py index ccce9632f185..484eaf824878 100644 --- a/tables/automl/model_test.py +++ b/tables/automl/model_test.py @@ -24,7 +24,7 @@ import dataset_test -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] REGION = "us-central1" STATIC_MODEL = "do_not_delete_this_model_0" GCS_DATASET = "gs://cloud-ml-tables-data/bank-marketing.csv" diff --git a/tables/automl/predict_test.py b/tables/automl/predict_test.py index e8a6e38b289f..d608e182f1f0 100644 --- a/tables/automl/predict_test.py +++ b/tables/automl/predict_test.py @@ -23,7 +23,7 @@ import model_test -PROJECT = os.environ["GCLOUD_PROJECT"] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] REGION = "us-central1" STATIC_MODEL = model_test.STATIC_MODEL diff --git a/tasks/create_http_task_test.py b/tasks/create_http_task_test.py index b1e50cc82dea..da61f11b63c2 100644 --- a/tasks/create_http_task_test.py +++ b/tasks/create_http_task_test.py @@ -16,7 +16,7 @@ import create_http_task -TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT') +TEST_PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') TEST_LOCATION = os.getenv('TEST_QUEUE_LOCATION', 'us-central1') TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'my-queue') diff --git a/tasks/create_http_task_with_token_test.py b/tasks/create_http_task_with_token_test.py index d95ceca33126..931cbd0ac295 100644 --- a/tasks/create_http_task_with_token_test.py +++ b/tasks/create_http_task_with_token_test.py @@ -16,7 +16,7 @@ import create_http_task_with_token -TEST_PROJECT_ID = os.getenv('GCLOUD_PROJECT') +TEST_PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') TEST_LOCATION = os.getenv('TEST_QUEUE_LOCATION', 'us-central1') TEST_QUEUE_NAME = os.getenv('TEST_QUEUE_NAME', 'my-queue') TEST_SERVICE_ACCOUNT = ( diff --git a/trace/trace-python-sample/main_test.py b/trace/trace-python-sample/main_test.py index c0f96e2de98c..b94f77019ef2 100644 --- a/trace/trace-python-sample/main_test.py +++ b/trace/trace-python-sample/main_test.py @@ -18,7 +18,7 @@ def test_index(): - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] main.app.testing = True main.app.config['TRACER'] = main.initialize_tracer(project_id) client = main.app.test_client() @@ -29,7 +29,7 @@ def test_index(): def test_redirect(): - project_id = os.environ['GCLOUD_PROJECT'] + project_id = os.environ['GOOGLE_CLOUD_PROJECT'] main.app.testing = True main.app.config['TRACER'] = main.initialize_tracer(project_id) client = main.app.test_client() diff --git a/translate/automl/dataset_test.py b/translate/automl/dataset_test.py index 29e3e5c9fe97..4430ec5400e0 100644 --- a/translate/automl/dataset_test.py +++ b/translate/automl/dataset_test.py @@ -21,7 +21,7 @@ import automl_translation_dataset -project_id = os.environ["GCLOUD_PROJECT"] +project_id = os.environ["GOOGLE_CLOUD_PROJECT"] compute_region = "us-central1" diff --git a/translate/automl/model_test.py b/translate/automl/model_test.py index 0d37a85c6740..e19a50ea7376 100644 --- a/translate/automl/model_test.py +++ b/translate/automl/model_test.py @@ -22,7 +22,7 @@ import automl_translation_model -project_id = os.environ["GCLOUD_PROJECT"] +project_id = os.environ["GOOGLE_CLOUD_PROJECT"] compute_region = "us-central1" diff --git a/translate/automl/predict_test.py b/translate/automl/predict_test.py index f9d98dfb053c..d00a4658d7bb 100644 --- a/translate/automl/predict_test.py +++ b/translate/automl/predict_test.py @@ -18,7 +18,7 @@ import automl_translation_predict -project_id = os.environ["GCLOUD_PROJECT"] +project_id = os.environ["GOOGLE_CLOUD_PROJECT"] compute_region = "us-central1" diff --git a/translate/automl/translate_v3_batch_translate_text_with_model_test.py b/translate/automl/translate_v3_batch_translate_text_with_model_test.py index a7801f604024..4d0def04df3e 100644 --- a/translate/automl/translate_v3_batch_translate_text_with_model_test.py +++ b/translate/automl/translate_v3_batch_translate_text_with_model_test.py @@ -21,7 +21,7 @@ import translate_v3_batch_translate_text_with_model -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] MODEL_ID = "TRL3128559826197068699" diff --git a/translate/cloud-client/beta_snippets_test.py b/translate/cloud-client/beta_snippets_test.py index 453fcb7ec4a1..a42ab08ce3fc 100644 --- a/translate/cloud-client/beta_snippets_test.py +++ b/translate/cloud-client/beta_snippets_test.py @@ -22,7 +22,7 @@ import beta_snippets -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] @pytest.fixture(scope='function') diff --git a/translate/cloud-client/hybrid_glossaries/hybrid_tutorial.py b/translate/cloud-client/hybrid_glossaries/hybrid_tutorial.py index 1b320e5b2a49..7d36174b4766 100644 --- a/translate/cloud-client/hybrid_glossaries/hybrid_tutorial.py +++ b/translate/cloud-client/hybrid_glossaries/hybrid_tutorial.py @@ -28,7 +28,7 @@ # [START translate_hybrid_project_id] # extract GCP project id -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] # [END translate_hybrid_project_id] diff --git a/translate/cloud-client/hybrid_glossaries/hybrid_tutorial_test.py b/translate/cloud-client/hybrid_glossaries/hybrid_tutorial_test.py index f99be330b92d..8df7cc351b73 100644 --- a/translate/cloud-client/hybrid_glossaries/hybrid_tutorial_test.py +++ b/translate/cloud-client/hybrid_glossaries/hybrid_tutorial_test.py @@ -23,7 +23,7 @@ from hybrid_tutorial import translate_text -PROJECT_ID = os.environ['GCLOUD_PROJECT'] +PROJECT_ID = os.environ['GOOGLE_CLOUD_PROJECT'] # VISION TESTS diff --git a/translate/cloud-client/translate_v3_batch_translate_text_test.py b/translate/cloud-client/translate_v3_batch_translate_text_test.py index 85d03e0b7d57..e7919d022938 100644 --- a/translate/cloud-client/translate_v3_batch_translate_text_test.py +++ b/translate/cloud-client/translate_v3_batch_translate_text_test.py @@ -21,7 +21,7 @@ import translate_v3_batch_translate_text -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] @pytest.fixture(scope="function") diff --git a/translate/cloud-client/translate_v3_batch_translate_text_with_glossary_test.py b/translate/cloud-client/translate_v3_batch_translate_text_with_glossary_test.py index c2033ad3630c..1a1850ac562e 100644 --- a/translate/cloud-client/translate_v3_batch_translate_text_with_glossary_test.py +++ b/translate/cloud-client/translate_v3_batch_translate_text_with_glossary_test.py @@ -26,7 +26,7 @@ import translate_v3_delete_glossary -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] GLOSSARY_INPUT_URI = "gs://cloud-samples-data/translation/glossary_ja.csv" diff --git a/translate/cloud-client/translate_v3_create_glossary_test.py b/translate/cloud-client/translate_v3_create_glossary_test.py index e133fd3ff4c2..a24f461e05ab 100644 --- a/translate/cloud-client/translate_v3_create_glossary_test.py +++ b/translate/cloud-client/translate_v3_create_glossary_test.py @@ -24,7 +24,7 @@ import translate_v3_delete_glossary -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] GLOSSARY_INPUT_URI = "gs://cloud-samples-data/translation/glossary_ja.csv" diff --git a/translate/cloud-client/translate_v3_delete_glossary_test.py b/translate/cloud-client/translate_v3_delete_glossary_test.py index 4309ca01b959..a88c16a37a2b 100644 --- a/translate/cloud-client/translate_v3_delete_glossary_test.py +++ b/translate/cloud-client/translate_v3_delete_glossary_test.py @@ -20,7 +20,7 @@ import translate_v3_create_glossary import translate_v3_delete_glossary -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] GLOSSARY_INPUT_URI = "gs://cloud-samples-data/translation/glossary_ja.csv" diff --git a/translate/cloud-client/translate_v3_detect_language_test.py b/translate/cloud-client/translate_v3_detect_language_test.py index 2e9df86721c9..7e9540cca009 100644 --- a/translate/cloud-client/translate_v3_detect_language_test.py +++ b/translate/cloud-client/translate_v3_detect_language_test.py @@ -17,7 +17,7 @@ import translate_v3_detect_language -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] def test_detect_language(capsys): diff --git a/translate/cloud-client/translate_v3_get_glossary_test.py b/translate/cloud-client/translate_v3_get_glossary_test.py index a2df0a4ba455..96ea6b78103d 100644 --- a/translate/cloud-client/translate_v3_get_glossary_test.py +++ b/translate/cloud-client/translate_v3_get_glossary_test.py @@ -25,7 +25,7 @@ import translate_v3_get_glossary -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] GLOSSARY_INPUT_URI = "gs://cloud-samples-data/translation/glossary_ja.csv" diff --git a/translate/cloud-client/translate_v3_get_supported_languages_test.py b/translate/cloud-client/translate_v3_get_supported_languages_test.py index 57ceeb203e8d..4bdc0fa4b14f 100644 --- a/translate/cloud-client/translate_v3_get_supported_languages_test.py +++ b/translate/cloud-client/translate_v3_get_supported_languages_test.py @@ -17,7 +17,7 @@ import translate_v3_get_supported_languages -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] def test_list_languages(capsys): diff --git a/translate/cloud-client/translate_v3_get_supported_languages_with_target_test.py b/translate/cloud-client/translate_v3_get_supported_languages_with_target_test.py index 3b123d9f5c1f..8f3f52cfe54d 100644 --- a/translate/cloud-client/translate_v3_get_supported_languages_with_target_test.py +++ b/translate/cloud-client/translate_v3_get_supported_languages_with_target_test.py @@ -17,7 +17,7 @@ import translate_v3_get_supported_languages_with_target as get_supported_langs -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] def test_list_languages_with_target(capsys): diff --git a/translate/cloud-client/translate_v3_list_glossary_test.py b/translate/cloud-client/translate_v3_list_glossary_test.py index 04e93470e40e..8f4eaa1ac512 100644 --- a/translate/cloud-client/translate_v3_list_glossary_test.py +++ b/translate/cloud-client/translate_v3_list_glossary_test.py @@ -25,7 +25,7 @@ import translate_v3_list_glossary -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] GLOSSARY_INPUT_URI = "gs://cloud-samples-data/translation/glossary_ja.csv" diff --git a/translate/cloud-client/translate_v3_translate_text_test.py b/translate/cloud-client/translate_v3_translate_text_test.py index 8897b9b527f9..c93cb91f6dd5 100644 --- a/translate/cloud-client/translate_v3_translate_text_test.py +++ b/translate/cloud-client/translate_v3_translate_text_test.py @@ -17,7 +17,7 @@ import translate_v3_translate_text -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] def test_translate_text(capsys): diff --git a/translate/cloud-client/translate_v3_translate_text_with_glossary_test.py b/translate/cloud-client/translate_v3_translate_text_with_glossary_test.py index bc5403c681b8..1caa9e6e9e00 100644 --- a/translate/cloud-client/translate_v3_translate_text_with_glossary_test.py +++ b/translate/cloud-client/translate_v3_translate_text_with_glossary_test.py @@ -26,7 +26,7 @@ import translate_v3_translate_text_with_glossary -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] GLOSSARY_INPUT_URI = "gs://cloud-samples-data/translation/glossary_ja.csv" diff --git a/translate/cloud-client/translate_v3_translate_text_with_model_test.py b/translate/cloud-client/translate_v3_translate_text_with_model_test.py index 16a5fc03db99..f1cd59687521 100644 --- a/translate/cloud-client/translate_v3_translate_text_with_model_test.py +++ b/translate/cloud-client/translate_v3_translate_text_with_model_test.py @@ -18,7 +18,7 @@ import translate_v3_translate_text_with_model -PROJECT_ID = os.environ["GCLOUD_PROJECT"] +PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"] MODEL_ID = "TRL3128559826197068699" diff --git a/video/cloud-client/analyze/beta_snippets_test.py b/video/cloud-client/analyze/beta_snippets_test.py index a0ac30ffbf8d..390f1f7c8798 100644 --- a/video/cloud-client/analyze/beta_snippets_test.py +++ b/video/cloud-client/analyze/beta_snippets_test.py @@ -157,7 +157,7 @@ def test_track_objects_gcs(): # Flaky Gateway @pytest.mark.flaky(max_runs=3, min_passes=1) def test_streaming_automl_classification(capsys, video_path): - project_id = os.environ["GCLOUD_PROJECT"] + project_id = os.environ["GOOGLE_CLOUD_PROJECT"] model_id = "VCN6363999689846554624" beta_snippets.streaming_automl_classification(video_path, project_id, model_id) out, _ = capsys.readouterr() diff --git a/vision/automl/model_test.py b/vision/automl/model_test.py index a272ce923345..bcb6c323e1e4 100644 --- a/vision/automl/model_test.py +++ b/vision/automl/model_test.py @@ -20,7 +20,7 @@ from google.cloud import automl_v1beta1 as automl import pytest -project_id = os.environ["GCLOUD_PROJECT"] +project_id = os.environ["GOOGLE_CLOUD_PROJECT"] compute_region = "us-central1" diff --git a/vision/cloud-client/product_search/create_product_set_test.py b/vision/cloud-client/product_search/create_product_set_test.py index 82f51c76c2b0..5dc5190c3500 100644 --- a/vision/cloud-client/product_search/create_product_set_test.py +++ b/vision/cloud-client/product_search/create_product_set_test.py @@ -21,7 +21,7 @@ create_product_set, delete_product_set, list_product_sets) -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_SET_DISPLAY_NAME = 'fake_product_set_display_name_for_testing' diff --git a/vision/cloud-client/product_search/create_product_test.py b/vision/cloud-client/product_search/create_product_test.py index 94057ec887ae..a4e55f14ee4e 100644 --- a/vision/cloud-client/product_search/create_product_test.py +++ b/vision/cloud-client/product_search/create_product_test.py @@ -20,7 +20,7 @@ from product_management import create_product, delete_product, list_products -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_DISPLAY_NAME = 'fake_product_display_name_for_testing' diff --git a/vision/cloud-client/product_search/import_product_sets_test.py b/vision/cloud-client/product_search/import_product_sets_test.py index b0dfdefaa217..b4faf8e54fb2 100644 --- a/vision/cloud-client/product_search/import_product_sets_test.py +++ b/vision/cloud-client/product_search/import_product_sets_test.py @@ -25,7 +25,7 @@ from reference_image_management import list_reference_images -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' FILENAME = uuid.uuid4() diff --git a/vision/cloud-client/product_search/product_in_product_set_management_test.py b/vision/cloud-client/product_search/product_in_product_set_management_test.py index dad975e2b57e..a807022bd99f 100644 --- a/vision/cloud-client/product_search/product_in_product_set_management_test.py +++ b/vision/cloud-client/product_search/product_in_product_set_management_test.py @@ -25,7 +25,7 @@ create_product_set, delete_product_set) -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_SET_DISPLAY_NAME = 'fake_product_set_display_name_for_testing' diff --git a/vision/cloud-client/product_search/product_management_test.py b/vision/cloud-client/product_search/product_management_test.py index dd58ab35236c..a0f4dcc656a4 100644 --- a/vision/cloud-client/product_search/product_management_test.py +++ b/vision/cloud-client/product_search/product_management_test.py @@ -22,7 +22,7 @@ purge_orphan_products, update_product_labels) -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_DISPLAY_NAME = 'fake_product_display_name_for_testing' diff --git a/vision/cloud-client/product_search/product_search_test.py b/vision/cloud-client/product_search/product_search_test.py index 74a259f82d18..8f862fc215a0 100644 --- a/vision/cloud-client/product_search/product_search_test.py +++ b/vision/cloud-client/product_search/product_search_test.py @@ -19,7 +19,7 @@ from product_search import get_similar_products_file, get_similar_products_uri -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_SET_ID = 'indexed_product_set_id_for_testing' diff --git a/vision/cloud-client/product_search/product_set_management_test.py b/vision/cloud-client/product_search/product_set_management_test.py index d7eae005d54b..9d8248de9073 100644 --- a/vision/cloud-client/product_search/product_set_management_test.py +++ b/vision/cloud-client/product_search/product_set_management_test.py @@ -21,7 +21,7 @@ create_product_set, delete_product_set, list_product_sets) -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_SET_DISPLAY_NAME = 'fake_product_set_display_name_for_testing' diff --git a/vision/cloud-client/product_search/reference_image_management_test.py b/vision/cloud-client/product_search/reference_image_management_test.py index 74db90954b05..5e6f8ac4f3b1 100644 --- a/vision/cloud-client/product_search/reference_image_management_test.py +++ b/vision/cloud-client/product_search/reference_image_management_test.py @@ -22,7 +22,7 @@ create_reference_image, delete_reference_image, list_reference_images) -PROJECT_ID = os.getenv('GCLOUD_PROJECT') +PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') LOCATION = 'us-west1' PRODUCT_DISPLAY_NAME = 'fake_product_display_name_for_testing'