From 3692a10199c065237d26b007e4a5cba555380f66 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Mon, 30 Mar 2020 16:55:31 -0700 Subject: [PATCH] chore: refactor repo tools usage (#1639) * chore: refactor repo tools usage by adding tests --- appengine/analytics/app.js | 2 ++ appengine/analytics/package.json | 5 +++-- appengine/analytics/test/app.test.js | 7 +++++++ appengine/building-an-app/build/package.json | 6 ++++-- appengine/building-an-app/build/test/server.test.js | 7 +++++++ appengine/building-an-app/update/package.json | 1 - appengine/cloudsql/package.json | 2 +- appengine/cloudsql_postgresql/package.json | 2 +- appengine/datastore/package.json | 5 +++-- appengine/datastore/test/app.test.js | 7 +++++++ appengine/endpoints/package.json | 3 +-- appengine/mailjet/app.js | 2 ++ appengine/mailjet/package.json | 5 +++-- appengine/mailjet/test/app.test.js | 11 +++++++++++ appengine/metadata/flexible/package.json | 5 +++-- appengine/metadata/flexible/test/server.test.js | 7 +++++++ appengine/metadata/standard/package.json | 5 +++-- appengine/metadata/standard/test/server.test.js | 7 +++++++ appengine/pubsub/package.json | 2 +- appengine/redis/package.json | 5 +++-- appengine/redis/test/server.test.js | 11 +++++++++++ appengine/sendgrid/package.json | 3 +-- appengine/sendgrid/test/appListening.test.js | 7 +++++++ appengine/static-files/app.js | 2 ++ appengine/static-files/package.json | 5 +++-- appengine/static-files/test/app.test.js | 7 +++++++ appengine/storage/flexible/package.json | 1 - appengine/storage/standard/package.json | 1 - appengine/typescript/index.ts | 3 +-- appengine/typescript/package.json | 2 +- appengine/websockets/package.json | 6 +++--- appengine/websockets/test/app.test.js | 7 +++++++ auth/package.json | 3 +-- containerengine/hello-world/package.json | 5 +++-- containerengine/hello-world/server.js | 2 ++ containerengine/hello-world/test/server.test.js | 7 +++++++ endpoints/getting-started-grpc/package.json | 3 +-- endpoints/getting-started/package.json | 3 +-- functions/billing/package.json | 1 - functions/composer-storage-trigger/package.json | 1 - functions/env_vars/package.json | 1 - functions/firebase/package.json | 1 - functions/helloworld/package.json | 1 - functions/http/package.json | 1 - functions/imagemagick/package.json | 1 - functions/log/package.json | 1 - functions/node8/package.json | 1 - functions/ocr/app/package.json | 1 - functions/pubsub/package.json | 1 - functions/sendgrid/package.json | 1 - functions/slack/package.json | 1 - functions/spanner/package.json | 1 - functions/speech-to-speech/functions/package.json | 1 - functions/sql/package.json | 1 - functions/tips/package.json | 1 - functions/tokenservice/functions/package.json | 1 - healthcare/datasets/package.json | 1 - healthcare/dicom/package.json | 1 - healthcare/fhir/package.json | 1 - healthcare/hl7v2/package.json | 1 - iot/http_example/package.json | 3 +-- iot/manager/package.json | 3 +-- iot/mqtt_example/package.json | 3 +-- jobs/v2/package.json | 3 +-- jobs/v3/package.json | 3 +-- opencensus/package.json | 3 +-- package.json | 1 - storage-transfer/package.json | 1 - 68 files changed, 140 insertions(+), 76 deletions(-) create mode 100644 appengine/analytics/test/app.test.js create mode 100644 appengine/building-an-app/build/test/server.test.js create mode 100644 appengine/datastore/test/app.test.js create mode 100644 appengine/mailjet/test/app.test.js create mode 100644 appengine/metadata/flexible/test/server.test.js create mode 100644 appengine/metadata/standard/test/server.test.js create mode 100644 appengine/redis/test/server.test.js create mode 100644 appengine/sendgrid/test/appListening.test.js create mode 100644 appengine/static-files/test/app.test.js create mode 100644 appengine/websockets/test/app.test.js create mode 100644 containerengine/hello-world/test/server.test.js diff --git a/appengine/analytics/app.js b/appengine/analytics/app.js index 057318eb37..d6b04b071b 100644 --- a/appengine/analytics/app.js +++ b/appengine/analytics/app.js @@ -72,4 +72,6 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); + +module.exports = app; // [END gae_flex_analytics_track_event] diff --git a/appengine/analytics/package.json b/appengine/analytics/package.json index 729f559083..8fd65d489c 100644 --- a/appengine/analytics/package.json +++ b/appengine/analytics/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "repo-tools test app", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { @@ -22,7 +22,8 @@ "got": "^10.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "cloud-repo-tools": { "test": { diff --git a/appengine/analytics/test/app.test.js b/appengine/analytics/test/app.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/analytics/test/app.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'app.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/building-an-app/build/package.json b/appengine/building-an-app/build/package.json index 25698439bf..e84d7027c3 100644 --- a/appengine/building-an-app/build/package.json +++ b/appengine/building-an-app/build/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "node server.js", "deploy": "gcloud app deploy", - "test": "repo-tools test app -- server.js" + "test": "mocha --exit test/*.test.js" }, "repository": { "type": "git", @@ -22,7 +22,9 @@ "express": "^4.16.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2", + "proxyquire": "^2.1.3" }, "cloud-repo-tools": { "requiresKeyFile": false, diff --git a/appengine/building-an-app/build/test/server.test.js b/appengine/building-an-app/build/test/server.test.js new file mode 100644 index 0000000000..4b0b8c990c --- /dev/null +++ b/appengine/building-an-app/build/test/server.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'server.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/building-an-app/update/package.json b/appengine/building-an-app/update/package.json index 8f71599afb..f0268c9347 100644 --- a/appengine/building-an-app/update/package.json +++ b/appengine/building-an-app/update/package.json @@ -23,7 +23,6 @@ "express": "^4.16.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "sinon": "^9.0.0", "supertest": "^4.0.2", diff --git a/appengine/cloudsql/package.json b/appengine/cloudsql/package.json index cb73e08666..80c2b7287f 100644 --- a/appengine/cloudsql/package.json +++ b/appengine/cloudsql/package.json @@ -18,7 +18,7 @@ "system-test": "repo-tools test app -- server.js", "system-test-proxy": "npm run start-proxy; npm run system-test", "all-test": "npm run unit-test && npm run system-test", - "test": "repo-tools test run --cmd npm -- run all-test" + "test": "npm -- run all-test" }, "dependencies": { "express": "^4.16.4", diff --git a/appengine/cloudsql_postgresql/package.json b/appengine/cloudsql_postgresql/package.json index b188302468..efe30faf08 100644 --- a/appengine/cloudsql_postgresql/package.json +++ b/appengine/cloudsql_postgresql/package.json @@ -18,7 +18,7 @@ "system-test": "repo-tools test app -- server.js", "system-test-proxy": "npm run start-proxy; npm run system-test", "all-test": "npm run unit-test && npm run system-test", - "test": "repo-tools test run --cmd npm -- run all-test" + "test": "npm -- run all-test" }, "dependencies": { "express": "^4.16.4", diff --git a/appengine/datastore/package.json b/appengine/datastore/package.json index 7688689b5f..7845ac9d37 100644 --- a/appengine/datastore/package.json +++ b/appengine/datastore/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "repo-tools test app", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { @@ -22,7 +22,8 @@ "express": "^4.16.4" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "cloud-repo-tools": { "test": { diff --git a/appengine/datastore/test/app.test.js b/appengine/datastore/test/app.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/datastore/test/app.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'app.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/endpoints/package.json b/appengine/endpoints/package.json index 218f7230dd..2d5de6c768 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -18,8 +18,7 @@ "unit-test": "mocha test/ --timeout=60000 --exit", "system-test": "repo-tools test app", "all-test": "npm run unit-test && npm run system-test", - "test": "repo-tools test run --cmd npm -- run all-test", - "e2e-test": "repo-tools test deploy" + "test": "repo-tools test run --cmd npm -- run all-test" }, "dependencies": { "body-parser": "^1.18.3", diff --git a/appengine/mailjet/app.js b/appengine/mailjet/app.js index d68882c69d..5ccfbb1602 100644 --- a/appengine/mailjet/app.js +++ b/appengine/mailjet/app.js @@ -79,3 +79,5 @@ const server = app.listen(process.env.PORT || 8080, () => { console.log('App listening on port %s', server.address().port); console.log('Press Ctrl+C to quit.'); }); + +module.exports = app; diff --git a/appengine/mailjet/package.json b/appengine/mailjet/package.json index e35fa95069..6c489eed06 100644 --- a/appengine/mailjet/package.json +++ b/appengine/mailjet/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "repo-tools test app", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { @@ -24,7 +24,8 @@ "node-mailjet": "^3.3.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "cloud-repo-tools": { "test": { diff --git a/appengine/mailjet/test/app.test.js b/appengine/mailjet/test/app.test.js new file mode 100644 index 0000000000..6e6ea2effb --- /dev/null +++ b/appengine/mailjet/test/app.test.js @@ -0,0 +1,11 @@ +const app = require('../app'); + +const request = require('supertest'); + +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); +}); diff --git a/appengine/metadata/flexible/package.json b/appengine/metadata/flexible/package.json index 30b7c69e20..4e73a4169f 100644 --- a/appengine/metadata/flexible/package.json +++ b/appengine/metadata/flexible/package.json @@ -13,7 +13,7 @@ "node": ">=8.0.0" }, "scripts": { - "system-test": "repo-tools test app -- server.js", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { @@ -21,7 +21,8 @@ "got": "^10.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "cloud-repo-tools": { "test": { diff --git a/appengine/metadata/flexible/test/server.test.js b/appengine/metadata/flexible/test/server.test.js new file mode 100644 index 0000000000..4b0b8c990c --- /dev/null +++ b/appengine/metadata/flexible/test/server.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'server.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/metadata/standard/package.json b/appengine/metadata/standard/package.json index d0b46532d4..7bff583d29 100644 --- a/appengine/metadata/standard/package.json +++ b/appengine/metadata/standard/package.json @@ -13,7 +13,7 @@ "node": ">=8.0.0" }, "scripts": { - "system-test": "repo-tools test app -- ./server.js", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { @@ -21,7 +21,8 @@ "got": "^10.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "cloud-repo-tools": { "test": { diff --git a/appengine/metadata/standard/test/server.test.js b/appengine/metadata/standard/test/server.test.js new file mode 100644 index 0000000000..4b0b8c990c --- /dev/null +++ b/appengine/metadata/standard/test/server.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'server.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/pubsub/package.json b/appengine/pubsub/package.json index e824acd770..08c080242d 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "repo-tools test app && mocha */*.test.js --timeout=30000 --exit" + "test": "repo-tools test app && mocha test/app.test.js --timeout=30000 --exit" }, "dependencies": { "@google-cloud/pubsub": "^1.0.0", diff --git a/appengine/redis/package.json b/appengine/redis/package.json index 26634388c8..745b7a3c0d 100644 --- a/appengine/redis/package.json +++ b/appengine/redis/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node server.js", - "test": "repo-tools test app -- server.js" + "test": "mocha test/*.test.js --timeout=30000 --exit" }, "cloud-repo-tools": { "test": { @@ -32,6 +32,7 @@ "redis": "^3.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" } } diff --git a/appengine/redis/test/server.test.js b/appengine/redis/test/server.test.js new file mode 100644 index 0000000000..6e7b7f0c80 --- /dev/null +++ b/appengine/redis/test/server.test.js @@ -0,0 +1,11 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'server.js')); + +after(() => { + process.exitCode(0); +}); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/sendgrid/package.json b/appengine/sendgrid/package.json index 6feae6ad95..4f15eb38a4 100644 --- a/appengine/sendgrid/package.json +++ b/appengine/sendgrid/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "repo-tools test app && mocha test/*.test.js" + "test": "mocha test/*.test.js" }, "dependencies": { "body-parser": "^1.19.0", @@ -19,7 +19,6 @@ "@sendgrid/client": "^6.3.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "supertest": "^4.0.2", "proxyquire": "^2.1.3" diff --git a/appengine/sendgrid/test/appListening.test.js b/appengine/sendgrid/test/appListening.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/sendgrid/test/appListening.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'app.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/static-files/app.js b/appengine/static-files/app.js index b2abac2b71..2c4884eeff 100644 --- a/appengine/static-files/app.js +++ b/appengine/static-files/app.js @@ -33,4 +33,6 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); + +module.exports = app; // [END gae_flex_node_static_files] diff --git a/appengine/static-files/package.json b/appengine/static-files/package.json index 12a7b91112..7b36e14833 100644 --- a/appengine/static-files/package.json +++ b/appengine/static-files/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "repo-tools test app --url localhost:8080/static/main.css" + "test": "mocha --exit test/*.test.js --url localhost:8080/static/main.css" }, "cloud-repo-tools": { "test": { @@ -25,6 +25,7 @@ "pug": "^2.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" } } diff --git a/appengine/static-files/test/app.test.js b/appengine/static-files/test/app.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/static-files/test/app.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'app.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/appengine/storage/flexible/package.json b/appengine/storage/flexible/package.json index 27d2878c5f..4f4901bb7f 100644 --- a/appengine/storage/flexible/package.json +++ b/appengine/storage/flexible/package.json @@ -16,7 +16,6 @@ "pug": "^2.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "supertest": "^4.0.2", "proxyquire": "^2.1.3" diff --git a/appengine/storage/standard/package.json b/appengine/storage/standard/package.json index 27d2878c5f..4f4901bb7f 100644 --- a/appengine/storage/standard/package.json +++ b/appengine/storage/standard/package.json @@ -16,7 +16,6 @@ "pug": "^2.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "supertest": "^4.0.2", "proxyquire": "^2.1.3" diff --git a/appengine/typescript/index.ts b/appengine/typescript/index.ts index 5660745a5a..38b357b34c 100644 --- a/appengine/typescript/index.ts +++ b/appengine/typescript/index.ts @@ -11,10 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +import express = require('express'); const PORT = Number(process.env.PORT) || 8080; -import * as express from "express"; - const app = express(); app.get("/", (req, res) => { diff --git a/appengine/typescript/package.json b/appengine/typescript/package.json index fb637e6213..c9fa20e9fd 100644 --- a/appengine/typescript/package.json +++ b/appengine/typescript/package.json @@ -11,7 +11,7 @@ "scripts": { "prepare": "npm run gcp-build", "pretest": "npm run gcp-build", - "test": "repo-tools test app -- index.js", + "test": "repo-tools test app -- index.js", "posttest": "npm run lint", "lint": "tslint -p .", "start": "node ./index.js", diff --git a/appengine/websockets/package.json b/appengine/websockets/package.json index aaa0bc745f..43a6d6333e 100644 --- a/appengine/websockets/package.json +++ b/appengine/websockets/package.json @@ -13,16 +13,16 @@ "start": "node app.js", "lint": "eslint .", "fix": "eslint --fix .", - "test": "repo-tools test app & mocha */*.test.js --timeout=30000 --exit", + "test": "mocha --exit test/*.test.js", "e2e-test": "samples test deploy" }, "dependencies": { "express": "^4.15.4", "pug": "^2.0.3", - "socket.io": "^2.2.0" + "socket.io": "^2.2.0", + "supertest": "^4.0.2" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", diff --git a/appengine/websockets/test/app.test.js b/appengine/websockets/test/app.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/websockets/test/app.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'app.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/auth/package.json b/auth/package.json index 5654fb77da..e682ff07ce 100644 --- a/auth/package.json +++ b/auth/package.json @@ -12,7 +12,7 @@ "node": ">=8.0.0" }, "scripts": { - "test": "repo-tools test run --cmd=npm -- run system-test", + "test": "npm -- run system-test", "system-test": "mocha system-test/*.test.js --timeout=30000" }, "dependencies": { @@ -20,7 +20,6 @@ "yargs": "^15.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0" } } diff --git a/containerengine/hello-world/package.json b/containerengine/hello-world/package.json index c19337566d..ae3f827a34 100644 --- a/containerengine/hello-world/package.json +++ b/containerengine/hello-world/package.json @@ -14,12 +14,13 @@ }, "scripts": { "start": "node server.js", - "system-test": "repo-tools test app -- server.js", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": {}, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "cloud-repo-tools": { "test": { diff --git a/containerengine/hello-world/server.js b/containerengine/hello-world/server.js index 0681877709..1fcab693b3 100644 --- a/containerengine/hello-world/server.js +++ b/containerengine/hello-world/server.js @@ -22,4 +22,6 @@ const handleRequest = function (req, res) { }; const www = http.createServer(handleRequest); www.listen(process.env.PORT || 8080); + +module.exports = www; // [END all] diff --git a/containerengine/hello-world/test/server.test.js b/containerengine/hello-world/test/server.test.js new file mode 100644 index 0000000000..4b0b8c990c --- /dev/null +++ b/containerengine/hello-world/test/server.test.js @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'server.js')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); diff --git a/endpoints/getting-started-grpc/package.json b/endpoints/getting-started-grpc/package.json index e49774b3c0..651250985c 100644 --- a/endpoints/getting-started-grpc/package.json +++ b/endpoints/getting-started-grpc/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node server.js", - "test": "repo-tools test run --cmd mocha -- system-test/*.test.js --timeout=60000" + "test": "mocha --exit system-test/*.test.js --timeout=60000" }, "dependencies": { "google-auth-library": "^6.0.0", @@ -23,7 +23,6 @@ "yargs": "^15.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "delay": "^4.2.0", "mocha": "^7.0.0" }, diff --git a/endpoints/getting-started/package.json b/endpoints/getting-started/package.json index 233efe3ea0..adaf983471 100644 --- a/endpoints/getting-started/package.json +++ b/endpoints/getting-started/package.json @@ -14,14 +14,13 @@ }, "scripts": { "start": "node app.js", - "test": "repo-tools test run --cmd mocha -- test/*.test.js --timeout=20000" + "test": "mocha -- test/*.test.js --timeout=20000" }, "dependencies": { "body-parser": "^1.18.3", "express": "^4.16.4" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0", diff --git a/functions/billing/package.json b/functions/billing/package.json index bacb389ee4..57023f9cb6 100644 --- a/functions/billing/package.json +++ b/functions/billing/package.json @@ -19,7 +19,6 @@ }, "devDependencies": { "@google-cloud/functions-framework": "^1.1.1", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "child-process-promise": "^2.2.1", "mocha": "^7.0.0", "promise-retry": "^1.1.1", diff --git a/functions/composer-storage-trigger/package.json b/functions/composer-storage-trigger/package.json index 00b6e64afc..41d0fc2c50 100644 --- a/functions/composer-storage-trigger/package.json +++ b/functions/composer-storage-trigger/package.json @@ -16,7 +16,6 @@ "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0" diff --git a/functions/env_vars/package.json b/functions/env_vars/package.json index 5c457b9131..1d079e1ed1 100644 --- a/functions/env_vars/package.json +++ b/functions/env_vars/package.json @@ -16,7 +16,6 @@ }, "dependencies": {}, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "sinon": "^9.0.0" }, diff --git a/functions/firebase/package.json b/functions/firebase/package.json index 2e6aef1433..0564339122 100644 --- a/functions/firebase/package.json +++ b/functions/firebase/package.json @@ -15,7 +15,6 @@ "test": "mocha -T 30s test/*.test.js" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0", diff --git a/functions/helloworld/package.json b/functions/helloworld/package.json index cc7e955230..d14b691922 100644 --- a/functions/helloworld/package.json +++ b/functions/helloworld/package.json @@ -24,7 +24,6 @@ }, "devDependencies": { "@google-cloud/functions-framework": "^1.1.1", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "@google-cloud/storage": "^4.0.0", "child-process-promise": "^2.2.1", diff --git a/functions/http/package.json b/functions/http/package.json index 75f7915bdf..90113f1c8f 100644 --- a/functions/http/package.json +++ b/functions/http/package.json @@ -15,7 +15,6 @@ "test": "mocha test/*.test.js --timeout=60000" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0", diff --git a/functions/imagemagick/package.json b/functions/imagemagick/package.json index 282ba9f4c6..f4def2450c 100644 --- a/functions/imagemagick/package.json +++ b/functions/imagemagick/package.json @@ -21,7 +21,6 @@ }, "devDependencies": { "@google-cloud/functions-framework": "^1.1.1", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "child-process-promise": "^2.2.1", "mocha": "^7.0.0", "proxyquire": "^2.1.0", diff --git a/functions/log/package.json b/functions/log/package.json index 32679aa8e9..c711c95947 100644 --- a/functions/log/package.json +++ b/functions/log/package.json @@ -19,7 +19,6 @@ "@google-cloud/monitoring": "^1.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0" diff --git a/functions/node8/package.json b/functions/node8/package.json index a96e64f2e0..436412ff10 100644 --- a/functions/node8/package.json +++ b/functions/node8/package.json @@ -18,7 +18,6 @@ "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples/issues" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0", diff --git a/functions/ocr/app/package.json b/functions/ocr/app/package.json index 730e3d5c4e..cb07944712 100644 --- a/functions/ocr/app/package.json +++ b/functions/ocr/app/package.json @@ -22,7 +22,6 @@ "nconf": "^0.10.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "sinon": "^9.0.0" }, diff --git a/functions/pubsub/package.json b/functions/pubsub/package.json index 681976ae1e..053754ffd7 100644 --- a/functions/pubsub/package.json +++ b/functions/pubsub/package.json @@ -20,7 +20,6 @@ }, "devDependencies": { "@google-cloud/functions-framework": "^1.3.2", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "child-process-promise": "^2.2.1", "mocha": "^7.0.0", "request": "^2.88.0", diff --git a/functions/sendgrid/package.json b/functions/sendgrid/package.json index a6892b26e3..a8f7db581f 100644 --- a/functions/sendgrid/package.json +++ b/functions/sendgrid/package.json @@ -21,7 +21,6 @@ "uuid": "^7.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0" diff --git a/functions/slack/package.json b/functions/slack/package.json index 63ef398ca6..c201365f94 100644 --- a/functions/slack/package.json +++ b/functions/slack/package.json @@ -19,7 +19,6 @@ "googleapis": "^48.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0" diff --git a/functions/spanner/package.json b/functions/spanner/package.json index d334d801b1..6884816519 100644 --- a/functions/spanner/package.json +++ b/functions/spanner/package.json @@ -18,7 +18,6 @@ "@google-cloud/spanner": "^4.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0" diff --git a/functions/speech-to-speech/functions/package.json b/functions/speech-to-speech/functions/package.json index 737a9e8eeb..fef6201622 100644 --- a/functions/speech-to-speech/functions/package.json +++ b/functions/speech-to-speech/functions/package.json @@ -43,7 +43,6 @@ }, "devDependencies": { "@google-cloud/functions-framework": "^1.1.1", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "child-process-promise": "^2.2.1", "mocha": "^7.0.0", "request": "^2.88.0", diff --git a/functions/sql/package.json b/functions/sql/package.json index 10329db6b3..8b9ab7719c 100644 --- a/functions/sql/package.json +++ b/functions/sql/package.json @@ -24,7 +24,6 @@ "pg": "^8.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0", "sinon": "^9.0.0" diff --git a/functions/tips/package.json b/functions/tips/package.json index 80e41bbe20..bbbdc76916 100644 --- a/functions/tips/package.json +++ b/functions/tips/package.json @@ -18,7 +18,6 @@ "@google-cloud/pubsub": "^1.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "sinon": "^9.0.0" }, diff --git a/functions/tokenservice/functions/package.json b/functions/tokenservice/functions/package.json index 8fa678a986..e47825c1f5 100644 --- a/functions/tokenservice/functions/package.json +++ b/functions/tokenservice/functions/package.json @@ -19,7 +19,6 @@ }, "devDependencies": { "@google-cloud/functions-framework": "^1.1.1", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "babel-eslint": "^10.0.2", "child-process-promise": "^2.2.1", "eslint": "^6.0.0", diff --git a/healthcare/datasets/package.json b/healthcare/datasets/package.json index 10db5eafdf..3d5438604d 100644 --- a/healthcare/datasets/package.json +++ b/healthcare/datasets/package.json @@ -12,7 +12,6 @@ "test": "mocha system-test/*.test.js --timeout=60000" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0" }, "dependencies": { diff --git a/healthcare/dicom/package.json b/healthcare/dicom/package.json index f38afa8619..1e295155ce 100644 --- a/healthcare/dicom/package.json +++ b/healthcare/dicom/package.json @@ -12,7 +12,6 @@ "test": "mocha system-test/*.test.js --timeout=60000" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "@google-cloud/storage": "^4.0.0", "mocha": "^7.0.0" diff --git a/healthcare/fhir/package.json b/healthcare/fhir/package.json index 49d2b2bad0..c69b010cc2 100644 --- a/healthcare/fhir/package.json +++ b/healthcare/fhir/package.json @@ -12,7 +12,6 @@ "test": "mocha system-test/*.test.js --timeout=60000" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "@google-cloud/storage": "^4.0.0", "mocha": "^7.0.0" diff --git a/healthcare/hl7v2/package.json b/healthcare/hl7v2/package.json index 78877e0c14..80b85004b2 100644 --- a/healthcare/hl7v2/package.json +++ b/healthcare/hl7v2/package.json @@ -12,7 +12,6 @@ "test": "mocha system-test/*.test.js --timeout=60000" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "mocha": "^7.0.0" }, diff --git a/iot/http_example/package.json b/iot/http_example/package.json index a5e673b763..e7f5da3662 100644 --- a/iot/http_example/package.json +++ b/iot/http_example/package.json @@ -12,7 +12,7 @@ "node": ">=8.0.0" }, "scripts": { - "test": "repo-tools test install --cmd=npm -- run system-test", + "test": "npm -- run system-test", "system-test": "mocha system-test/*.test.js --timeout=60000" }, "dependencies": { @@ -22,7 +22,6 @@ "yargs": "^15.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "googleapis": "^48.0.0", "mocha": "^7.0.0", diff --git a/iot/manager/package.json b/iot/manager/package.json index 6a6f54525a..34882fb798 100644 --- a/iot/manager/package.json +++ b/iot/manager/package.json @@ -13,7 +13,7 @@ "node": ">=8.0.0" }, "scripts": { - "test": "repo-tools test install --cmd=npm -- run system-test", + "test": "npm -- run system-test", "system-test": "mocha system-test/*.test.js --timeout=600000" }, "dependencies": { @@ -23,7 +23,6 @@ "yargs": "^15.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0", "uuid": "^7.0.0" }, diff --git a/iot/mqtt_example/package.json b/iot/mqtt_example/package.json index f0b78f4482..c05d461738 100644 --- a/iot/mqtt_example/package.json +++ b/iot/mqtt_example/package.json @@ -13,7 +13,7 @@ "node": ">=8.0.0" }, "scripts": { - "test": "repo-tools test install --cmd=npm -- run system-test", + "test": "npm -- run system-test", "system-test": "mocha system-test/*.test.js --timeout=600000" }, "dependencies": { @@ -23,7 +23,6 @@ "yargs": "^15.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/pubsub": "^1.0.0", "mocha": "^7.0.0", "uuid": "^7.0.0" diff --git a/jobs/v2/package.json b/jobs/v2/package.json index 8fd7bea991..d0adbe5c18 100644 --- a/jobs/v2/package.json +++ b/jobs/v2/package.json @@ -12,14 +12,13 @@ "node": ">=8.0.0" }, "scripts": { - "test": "repo-tools test install --cmd=npm -- run system-test", + "test": "npm -- run system-test", "system-test": "mocha system-test/*.test.js --timeout=60000" }, "dependencies": { "googleapis": "^48.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0" } } diff --git a/jobs/v3/package.json b/jobs/v3/package.json index 1061d3f985..b13265585f 100644 --- a/jobs/v3/package.json +++ b/jobs/v3/package.json @@ -12,7 +12,7 @@ "node": ">=8.0.0" }, "scripts": { - "test": "repo-tools test install --cmd=npm -- run system-test", + "test": "npm -- run system-test", "system-test": "mocha system-test/*.test.js --timeout=40000" }, "dependencies": { @@ -21,7 +21,6 @@ "yargs": "^15.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0" } } diff --git a/opencensus/package.json b/opencensus/package.json index ca0b04b791..8844e945b0 100644 --- a/opencensus/package.json +++ b/opencensus/package.json @@ -14,14 +14,13 @@ }, "scripts": { "start": "node metrics-quickstart.js", - "test": "repo-tools test run --cmd mocha -- system-test/*.test.js --timeout=5000 --exit" + "test": "mocha -- system-test/*.test.js --timeout=5000 --exit" }, "dependencies": { "@opencensus/core": "^0.0.21", "@opencensus/exporter-stackdriver": "^0.0.21" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^7.0.0" }, "cloud-repo-tools": { diff --git a/package.json b/package.json index 54e341bdb6..2cb490bc93 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "test": "echo 'Please run tests in each sample directory.' && exit 1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", diff --git a/storage-transfer/package.json b/storage-transfer/package.json index 7f381ef655..84aef7b404 100644 --- a/storage-transfer/package.json +++ b/storage-transfer/package.json @@ -22,7 +22,6 @@ "yargs": "^15.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@google-cloud/storage": "^4.0.0", "mocha": "^7.0.0", "proxyquire": "^2.1.0",