Skip to content

Commit 4df7416

Browse files
committed
Use standard environment variable name for bucket
1 parent 9caffad commit 4df7416

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

appengine/standard/migration/storage/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ api_version: 1
33
threadsafe: yes
44

55
env_variables:
6-
BUCKET_NAME: "REPLACE THIS WITH YOUR EXISTING BUCKET NAME"
6+
CLOUD_STORAGE_BUCKET: "REPLACE THIS WITH YOUR EXISTING BUCKET NAME"
77
BLOB_NAME: "my-demo-blob"
88

99
libraries:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
runtime: python37
22

33
env_variables:
4-
BUCKET_NAME: "REPLACE THIS WITH YOUR EXISTING BUCKET NAME"
4+
CLOUD_STORAGE_BUCKET: "REPLACE THIS WITH YOUR EXISTING BUCKET NAME"
55
BLOB_NAME: "my-demo-blob"

appengine/standard/migration/storage/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
@app.route('/', methods=['GET'])
2525
def get():
26-
bucket_name = os.environ['BUCKET_NAME']
26+
bucket_name = os.environ['CLOUD_STORAGE_BUCKET']
2727
blob_name = os.environ['BLOB_NAME']
2828

2929
client = storage.Client()

appengine/standard/migration/storage/main_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def test_index():
2424
assert r.status_code == 200
2525
assert 'Downloaded text matches uploaded text' in r.data.decode('utf-8')
2626

27-
bucket_name = os.environ['BUCKET_NAME']
27+
bucket_name = os.environ['CLOUD_STORAGE_BUCKET']
2828
blob_name = os.environ['BLOB_NAME']
2929
assert ' {}/{}'.format(bucket_name, blob_name) in r.data.decode('utf-8')
3030
assert 'Blob {} deleted.'.format(blob_name) in r.data.decode('utf-8')
31-

0 commit comments

Comments
 (0)