Skip to content

Commit

Permalink
Replace GCLOUD_PROJECT with GOOGLE_CLOUD_PROJECT.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisvg committed Jun 9, 2020
1 parent 2b508e6 commit 1b5b50c
Show file tree
Hide file tree
Showing 166 changed files with 176 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/tasks/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion appengine/standard/background/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import main

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions appengine/standard/pubsub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion appengine/standard/storage/api-client/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import main

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


def test_get():
Expand Down
2 changes: 1 addition & 1 deletion appengine/standard/storage/appengine-client/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import main

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


def test_get(testbed):
Expand Down
4 changes: 2 additions & 2 deletions appengine/standard_python3/pubsub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions appengine/standard_python37/pubsub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import quickstart_batchgetassetshistory

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']
BUCKET = 'assets-{}'.format(uuid.uuid4().hex)


Expand Down
2 changes: 1 addition & 1 deletion asset/cloud-client/quickstart_deletefeed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion asset/cloud-client/quickstart_exportassets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import quickstart_exportassets

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']
BUCKET = 'assets-{}'.format(uuid.uuid4().hex)


Expand Down
2 changes: 1 addition & 1 deletion asset/cloud-client/quickstart_getfeed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion asset/cloud-client/quickstart_listfeeds_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import quickstart_listfeeds

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


def test_list_feeds(capsys):
Expand Down
2 changes: 1 addition & 1 deletion asset/cloud-client/quickstart_updatefeed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions auth/api-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


def test_implicit():
snippets.implicit(os.environ['GCLOUD_PROJECT'])
snippets.implicit(os.environ['GOOGLE_CLOUD_PROJECT'])


def test_explicit():
Expand All @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion automl/beta/set_endpoint_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion automl/beta/video_classification_create_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion automl/beta/video_object_tracking_create_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion bigquery/cloud-client/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bigquery/cloud-client/user_credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from user_credentials import main


PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions bigquery/pandas-gbq-migration/samples_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion bigquery/transfer/cloud-client/quickstart_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import quickstart


PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion bigtable/hello/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bigtable/hello_happybase/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bigtable/metricscaler/metricscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion bigtable/metricscaler/metricscaler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-{}'
Expand Down
2 changes: 1 addition & 1 deletion bigtable/quickstart/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bigtable/quickstart_happybase/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bigtable/snippets/filters/filters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-{}'

Expand Down
2 changes: 1 addition & 1 deletion bigtable/snippets/reads/reads_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-{}'

Expand Down
2 changes: 1 addition & 1 deletion bigtable/snippets/writes/writes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-{}'

Expand Down
2 changes: 1 addition & 1 deletion bigtable/tableadmin/tableadmin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from blog import main

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


@pytest.mark.flaky
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from wiki import main

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


@pytest.mark.flaky
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion compute/api/create_instance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']


Expand Down
2 changes: 1 addition & 1 deletion compute/auth/access_token_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import access_token

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


@mock.patch('access_token.requests')
Expand Down
2 changes: 1 addition & 1 deletion compute/auth/application_default_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from application_default import main

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


def test_main():
Expand Down
2 changes: 1 addition & 1 deletion compute/encryption/generate_wrapped_rsa_key_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import generate_wrapped_rsa_key

PROJECT = os.environ['GCLOUD_PROJECT']
PROJECT = os.environ['GOOGLE_CLOUD_PROJECT']


def test_main():
Expand Down
Loading

0 comments on commit 1b5b50c

Please sign in to comment.