Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message, explicitly delete legacy formatted functions #649

Merged
merged 7 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .kokoro/functions-helloworld.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

export GCLOUD_PROJECT=nodejs-docs-samples-tests
STAGE_BUCKET=$GCLOUD_PROJECT
GCP_REGION=us-central1
export GCP_REGION=us-central1
export FUNCTIONS_TOPIC=integration-test-functions
export FUNCTIONS_BUCKET=$FUNCTIONS_TOPIC
export BASE_URL=https://${GCP_REGION}-${GCLOUD_PROJECT}.cloudfunctions.net
Expand All @@ -26,6 +26,9 @@ cd github/nodejs-docs-samples/functions/helloworld
# Install dependencies
npm install

# Install global dependencies used in some integration tests.
npm install -g @google-cloud/functions-emulator@1.0.0-beta.4

# Configure gcloud
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secrets-key.json
gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS"
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
override:
- echo $KEYFILE > /home/ubuntu/nodejs-docs-samples/key.json
- gcloud auth activate-service-account --key-file /home/ubuntu/nodejs-docs-samples/key.json || true
- yarn global add ava nyc codecov semistandard @google-cloud/nodejs-repo-tools@1.4.17 @google-cloud/functions-emulator@1.0.0-beta.4
- yarn global add ava nyc codecov @google-cloud/nodejs-repo-tools@1.4.17 @google-cloud/functions-emulator@1.0.0-beta.4
- yarn install
- yarn run lint
- samples test install -l=functions/background
Expand Down
1 change: 1 addition & 0 deletions functions/background/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/gcs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
3 changes: 2 additions & 1 deletion functions/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"scripts": {
"lint": "repo-tools lint",
"pretest": "npm run lint",
"e2e-test": "export FUNCTIONS_CMD='gcloud functions' && sh test/updateFunctions.sh && BASE_URL=\"https://$GCF_REGION-$GCLOUD_PROJECT.cloudfunctions.net/\" ava -T 20s --verbose test/*.test.js",
"e2e-test": "export FUNCTIONS_CMD='gcloud functions' && sh test/updateFunctions.sh && BASE_URL=\"https://$GCP_REGION-$GCLOUD_PROJECT.cloudfunctions.net/\" ava -T 20s --verbose test/*.test.js",
"test": "export FUNCTIONS_CMD='functions-emulator' && sh test/updateFunctions.sh && export BASE_URL=\"http://localhost:8010/$GCLOUD_PROJECT/$GCF_REGION\" && ava -T 20s --verbose -c 1 test/index.test.js test/*unit*test.js test/*integration*test.js",
"system-test": "export FUNCTIONS_CMD='functions-emulator' && sh test/updateFunctions.sh && export BASE_URL=\"http://localhost:8010/$GCLOUD_PROJECT/$GCF_REGION\" && ava -T 20s --verbose test/*.test.js"
},
Expand All @@ -29,6 +29,7 @@
"@google-cloud/storage": "^1.5.0",
"ava": "0.25.0",
"proxyquire": "2.0.1",
"semistandard": "^12.0.1",
"sinon": "4.4.8",
"supertest": "^3.0.0",
"uuid": "^3.1.0"
Expand Down
2 changes: 1 addition & 1 deletion functions/helloworld/test/sample.system.storage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const localFileName = `test.txt`;
// Use unique GCS filename to avoid conflicts between concurrent test runs
const gcsFileName = `test-${uuid.v4()}.txt`;

const bucketName = process.env.BUCKET_NAME;
const bucketName = process.env.FUNCTIONS_BUCKET;
const bucket = storage.bucket(bucketName);
const baseCmd = `gcloud functions`;

Expand Down
1 change: 1 addition & 0 deletions functions/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions functions/imagemagick/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/log/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
5 changes: 3 additions & 2 deletions functions/sendgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=4.3.2"
},
"scripts": {
"lint": "samples lint",
"lint": "repo-tools lint",
"pretest": "npm run lint",
"test": "ava -T 20s --verbose test/*.test.js"
},
Expand All @@ -24,9 +24,10 @@
"uuid": "3.1.0"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "2.1.0",
"@google-cloud/nodejs-repo-tools": "^2.3.0",
"ava": "0.23.0",
"proxyquire": "1.8.0",
"semistandard": "^12.0.1",
"sinon": "4.0.2"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/spanner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/tips/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "2.2.5",
"ava": "0.25.0",
"semistandard": "^12.0.1",
"sinon": "^4.5.0"
},
"cloud-repo-tools": {
Expand Down
1 change: 1 addition & 0 deletions functions/uuid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "2.2.1",
"ava": "0.25.0",
"semistandard": "^12.0.1",
"sinon": "4.4.2"
},
"cloud-repo-tools": {
Expand Down