From 1b1fd012357009aeaad84c2ee000f8191ea73830 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 26 Mar 2020 14:37:15 -0700 Subject: [PATCH 01/19] chore: refactor repo tools usage --- appengine/analytics/app.js | 2 ++ appengine/analytics/package.json | 5 +++-- appengine/analytics/test/app.test.js | 7 +++++++ appengine/building-an-app/build/package.json | 5 +++-- appengine/building-an-app/build/test/server.test.js | 7 +++++++ appengine/building-an-app/update/package.json | 1 - appengine/cloudsql/package.json | 5 ++--- appengine/cloudsql/test/serverListening.test.js | 7 +++++++ appengine/cloudsql_postgresql/package.json | 5 ++--- .../cloudsql_postgresql/test/serverListening.test.js | 7 +++++++ appengine/datastore/package.json | 5 +++-- appengine/datastore/test/app.test.js | 7 +++++++ appengine/endpoints/package.json | 6 ++---- appengine/endpoints/test/appListening.test.js | 7 +++++++ appengine/mailjet/package.json | 5 +++-- appengine/mailjet/test/app.test.js | 7 +++++++ appengine/memcached/package.json | 5 +++-- appengine/memcached/test/app.test.js | 7 +++++++ 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 | 3 +-- appengine/pubsub/test/appListening.test.js | 7 +++++++ appengine/redis/package.json | 5 +++-- appengine/redis/test/server.test.js | 7 +++++++ appengine/sendgrid/package.json | 3 +-- appengine/sendgrid/test/appListening.test.js | 7 +++++++ 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/package.json | 9 +++++---- 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/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 - 70 files changed, 169 insertions(+), 86 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/cloudsql/test/serverListening.test.js create mode 100644 appengine/cloudsql_postgresql/test/serverListening.test.js create mode 100644 appengine/datastore/test/app.test.js create mode 100644 appengine/endpoints/test/appListening.test.js create mode 100644 appengine/mailjet/test/app.test.js create mode 100644 appengine/memcached/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/pubsub/test/appListening.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..eb45bdf50d 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 test/*.test.js --exit --timeout=20000", "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..2878654841 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 test/*.test.js --exit --timeout=20000" }, "repository": { "type": "git", @@ -22,7 +22,8 @@ "express": "^4.16.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" }, "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..7ce1b0e7b2 100644 --- a/appengine/cloudsql/package.json +++ b/appengine/cloudsql/package.json @@ -15,10 +15,10 @@ "scripts": { "unit-test": "mocha test/*.test.js --timeout=60000", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "repo-tools test app -- server.js", + "system-test": "mocha test/serverListening.test.js --timeout=60000", "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", @@ -27,7 +27,6 @@ "prompt": "^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/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js new file mode 100644 index 0000000000..4b0b8c990c --- /dev/null +++ b/appengine/cloudsql/test/serverListening.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/cloudsql_postgresql/package.json b/appengine/cloudsql_postgresql/package.json index acc5abfa61..70f4a181c4 100644 --- a/appengine/cloudsql_postgresql/package.json +++ b/appengine/cloudsql_postgresql/package.json @@ -15,10 +15,10 @@ "scripts": { "unit-test": "mocha test/*.test.js --timeout=30000", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "repo-tools test app -- server.js", + "system-test": "mocha test/serverListening.test.js --timeout=30000", "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", @@ -27,7 +27,6 @@ "prompt": "^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/appengine/cloudsql_postgresql/test/serverListening.test.js b/appengine/cloudsql_postgresql/test/serverListening.test.js new file mode 100644 index 0000000000..4b0b8c990c --- /dev/null +++ b/appengine/cloudsql_postgresql/test/serverListening.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/datastore/package.json b/appengine/datastore/package.json index 7688689b5f..58bbf7e064 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 test/*.test.js --timeout=30000", "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..91874f5168 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -16,17 +16,15 @@ "deploy": "gcloud app deploy", "start": "node app.js", "unit-test": "mocha test/ --timeout=60000 --exit", - "system-test": "repo-tools test app", + "system-test": "mocha test/appListening.test.js --timeout=60000 --exit", "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": "npm -- run all-test" }, "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/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/endpoints/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/mailjet/package.json b/appengine/mailjet/package.json index e35fa95069..8dd4ab26c9 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 test/ --timeout=60000 --exit", "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..b4d0b7d6bb --- /dev/null +++ b/appengine/mailjet/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/memcached/package.json b/appengine/memcached/package.json index 021dffe7a0..e59f778aba 100644 --- a/appengine/memcached/package.json +++ b/appengine/memcached/package.json @@ -10,13 +10,14 @@ }, "scripts": { "start": "node app.js", - "test": "repo-tools test app" + "test": "mocha test/ --timeout=60000 --exit" }, "dependencies": { "express": "^4.16.4", "memjs": "^1.2.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0" + "mocha": "^7.0.0", + "supertest": "^4.0.2" } } diff --git a/appengine/memcached/test/app.test.js b/appengine/memcached/test/app.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/memcached/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/metadata/flexible/package.json b/appengine/metadata/flexible/package.json index 30b7c69e20..a18b50cfb7 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 test/ --timeout=60000 --exit", "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..4171ddf40a 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 test/ --timeout=60000 --exit", "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 262f1ea4a0..76ba89aa02 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": "mocha */*.test.js --timeout=30000 --exit" }, "dependencies": { "@google-cloud/pubsub": "^1.0.0", @@ -20,7 +20,6 @@ "pug": "^2.0.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "jsonwebtoken": "^8.5.1", "mocha": "^7.0.0", "sinon": "^9.0.0", diff --git a/appengine/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js new file mode 100644 index 0000000000..b4d0b7d6bb --- /dev/null +++ b/appengine/pubsub/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/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..4b0b8c990c --- /dev/null +++ b/appengine/redis/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/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/package.json b/appengine/static-files/package.json index 12a7b91112..c61c5df063 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 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/package.json b/appengine/typescript/package.json index fb637e6213..ac42e83d39 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": "mocha test/*.test.js", "posttest": "npm run lint", "lint": "tslint -p .", "start": "node ./index.js", @@ -23,8 +23,9 @@ "typescript": "^3.0.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.3.0", "@types/express": "^4.16.0", - "tslint": "^6.0.0" + "tslint": "^6.0.0", + "mocha": "^7.0.0", + "supertest": "^4.0.2" } -} +} \ No newline at end of file diff --git a/appengine/websockets/package.json b/appengine/websockets/package.json index aaa0bc745f..cbe09777e0 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 test/*.test.js --timeout=30000 --exit", "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..a4f251be6a 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 test/*.test.js --timeout=30000 --exit", "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/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 2d3ab01592..a2567eec03 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 -- system-test/*.test.js --timeout=60000" }, "dependencies": { "google-auth-library": "^5.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 70c260d629..7683b23453 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 5b583ec1e9..4083622afc 100644 --- a/functions/sql/package.json +++ b/functions/sql/package.json @@ -24,7 +24,6 @@ "pg": "^7.4.3" }, "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 868bad9e27..8aa0ceaa5a 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 95f95f0d60..a72d6a8519 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 659c529156..eb280c6a28 100644 --- a/iot/http_example/package.json +++ b/iot/http_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=60000" }, "dependencies": { @@ -23,7 +23,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 dd2bbb6fda..475b52a2eb 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.20", "@opencensus/exporter-stackdriver": "^0.0.20" }, "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", From f34025d4a786f9461a3955ba3ef000ad8caeff5e Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 26 Mar 2020 15:26:26 -0700 Subject: [PATCH 02/19] chore: add app exports --- appengine/mailjet/app.js | 2 ++ appengine/mailjet/package.json | 2 +- appengine/memcached/app.js | 2 ++ appengine/pubsub/package.json | 2 +- appengine/typescript/index.ts | 4 +++- appengine/typescript/package.json | 2 +- containerengine/hello-world/server.js | 2 ++ endpoints/getting-started-grpc/package.json | 2 +- endpoints/getting-started/package.json | 2 +- 9 files changed, 14 insertions(+), 6 deletions(-) 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 8dd4ab26c9..5e337de463 100644 --- a/appengine/mailjet/package.json +++ b/appengine/mailjet/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "mocha test/ --timeout=60000 --exit", + "system-test": "mocha test/*.test.js --timeout=60000 --exit", "test": "npm run system-test" }, "dependencies": { diff --git a/appengine/memcached/app.js b/appengine/memcached/app.js index 3ba83e99a5..2576076f2b 100644 --- a/appengine/memcached/app.js +++ b/appengine/memcached/app.js @@ -47,3 +47,5 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); + +module.exports = app; diff --git a/appengine/pubsub/package.json b/appengine/pubsub/package.json index 76ba89aa02..a21ecca1ac 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha */*.test.js --timeout=30000 --exit" + "test": "mocha test/*.test.js --timeout=30000 --exit" }, "dependencies": { "@google-cloud/pubsub": "^1.0.0", diff --git a/appengine/typescript/index.ts b/appengine/typescript/index.ts index 5660745a5a..af248008bf 100644 --- a/appengine/typescript/index.ts +++ b/appengine/typescript/index.ts @@ -13,7 +13,7 @@ // limitations under the License. const PORT = Number(process.env.PORT) || 8080; -import * as express from "express"; +const express = require('express'); const app = express(); @@ -24,3 +24,5 @@ app.get("/", (req, res) => { app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); }); + +module.exports = app; \ No newline at end of file diff --git a/appengine/typescript/package.json b/appengine/typescript/package.json index ac42e83d39..c32e10e7e1 100644 --- a/appengine/typescript/package.json +++ b/appengine/typescript/package.json @@ -28,4 +28,4 @@ "mocha": "^7.0.0", "supertest": "^4.0.2" } -} \ No newline at end of file +} 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/endpoints/getting-started-grpc/package.json b/endpoints/getting-started-grpc/package.json index a2567eec03..d68f040711 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": "mocha -- system-test/*.test.js --timeout=60000" + "test": "mocha system-test/*.test.js --timeout=60000" }, "dependencies": { "google-auth-library": "^5.0.0", diff --git a/endpoints/getting-started/package.json b/endpoints/getting-started/package.json index adaf983471..270f3373de 100644 --- a/endpoints/getting-started/package.json +++ b/endpoints/getting-started/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha -- test/*.test.js --timeout=20000" + "test": "mocha test/*.test.js --timeout=20000" }, "dependencies": { "body-parser": "^1.18.3", From e767107490072dfce1898cfdd0a5a33574cfd01a Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 26 Mar 2020 15:44:48 -0700 Subject: [PATCH 03/19] fix: failing tests --- appengine/endpoints/package.json | 2 +- appengine/static-files/app.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/appengine/endpoints/package.json b/appengine/endpoints/package.json index 91874f5168..3017a696b2 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -15,7 +15,7 @@ "scripts": { "deploy": "gcloud app deploy", "start": "node app.js", - "unit-test": "mocha test/ --timeout=60000 --exit", + "unit-test": "mocha test/app.test.js --timeout=60000 --exit", "system-test": "mocha test/appListening.test.js --timeout=60000 --exit", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" 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] From 944d54bc47c673ee7d132ba65cbaf0c38b386812 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 26 Mar 2020 15:53:49 -0700 Subject: [PATCH 04/19] add ts file --- appengine/typescript/test/index.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 appengine/typescript/test/index.test.ts diff --git a/appengine/typescript/test/index.test.ts b/appengine/typescript/test/index.test.ts new file mode 100644 index 0000000000..85e936b315 --- /dev/null +++ b/appengine/typescript/test/index.test.ts @@ -0,0 +1,7 @@ +const supertest = require('supertest'); +const path = require('path'); +const app = require(path.join(__dirname, '../', 'index.ts')); + +it('should be listening', async () => { + await supertest(app).get('/').expect(200); +}); From 5c7e2594b1851fc28c1fc2bf6b2eece6ed2cabcb Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 15:15:58 -0700 Subject: [PATCH 05/19] fix: failing testss --- appengine/analytics/test/app.test.js | 4 ++++ appengine/building-an-app/build/test/server.test.js | 4 ++++ appengine/cloudsql/package.json | 3 ++- appengine/cloudsql/test/serverListening.test.js | 5 ++++- appengine/cloudsql_postgresql/test/serverListening.test.js | 4 ++++ appengine/datastore/test/app.test.js | 4 ++++ appengine/endpoints/test/appListening.test.js | 4 ++++ appengine/mailjet/test/app.test.js | 5 +++++ appengine/memcached/package.json | 2 +- appengine/memcached/test/app.test.js | 4 ++++ appengine/metadata/flexible/test/server.test.js | 4 ++++ appengine/metadata/standard/test/server.test.js | 4 ++++ appengine/pubsub/test/appListening.test.js | 4 ++++ appengine/redis/test/server.test.js | 4 ++++ appengine/sendgrid/test/appListening.test.js | 4 ++++ appengine/static-files/test/app.test.js | 4 ++++ appengine/typescript/package.json | 2 +- appengine/typescript/test/index.test.ts | 4 ++++ appengine/websockets/test/app.test.js | 4 ++++ containerengine/hello-world/test/server.test.js | 4 ++++ 20 files changed, 73 insertions(+), 4 deletions(-) diff --git a/appengine/analytics/test/app.test.js b/appengine/analytics/test/app.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/analytics/test/app.test.js +++ b/appengine/analytics/test/app.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/building-an-app/build/test/server.test.js b/appengine/building-an-app/build/test/server.test.js index 4b0b8c990c..74957ff785 100644 --- a/appengine/building-an-app/build/test/server.test.js +++ b/appengine/building-an-app/build/test/server.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/cloudsql/package.json b/appengine/cloudsql/package.json index 7ce1b0e7b2..80c2b7287f 100644 --- a/appengine/cloudsql/package.json +++ b/appengine/cloudsql/package.json @@ -15,7 +15,7 @@ "scripts": { "unit-test": "mocha test/*.test.js --timeout=60000", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "mocha test/serverListening.test.js --timeout=60000", + "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": "npm -- run all-test" @@ -27,6 +27,7 @@ "prompt": "^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/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js index 4b0b8c990c..d6d128c379 100644 --- a/appengine/cloudsql/test/serverListening.test.js +++ b/appengine/cloudsql/test/serverListening.test.js @@ -2,6 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); +}) it('should be listening', async () => { - await supertest(app).get('/').expect(200); + await supertest(app).get('/').expect(200) }); diff --git a/appengine/cloudsql_postgresql/test/serverListening.test.js b/appengine/cloudsql_postgresql/test/serverListening.test.js index 4b0b8c990c..74957ff785 100644 --- a/appengine/cloudsql_postgresql/test/serverListening.test.js +++ b/appengine/cloudsql_postgresql/test/serverListening.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/datastore/test/app.test.js b/appengine/datastore/test/app.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/datastore/test/app.test.js +++ b/appengine/datastore/test/app.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js index b4d0b7d6bb..5f4a545b55 100644 --- a/appengine/endpoints/test/appListening.test.js +++ b/appengine/endpoints/test/appListening.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); + }) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/mailjet/test/app.test.js b/appengine/mailjet/test/app.test.js index b4d0b7d6bb..c87a803bff 100644 --- a/appengine/mailjet/test/app.test.js +++ b/appengine/mailjet/test/app.test.js @@ -2,6 +2,11 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); + }) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); +ß \ No newline at end of file diff --git a/appengine/memcached/package.json b/appengine/memcached/package.json index e59f778aba..3c1699a9b1 100644 --- a/appengine/memcached/package.json +++ b/appengine/memcached/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha test/ --timeout=60000 --exit" + "test": "mocha test/*.test.js --timeout=60000 --exit" }, "dependencies": { "express": "^4.16.4", diff --git a/appengine/memcached/test/app.test.js b/appengine/memcached/test/app.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/memcached/test/app.test.js +++ b/appengine/memcached/test/app.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/metadata/flexible/test/server.test.js b/appengine/metadata/flexible/test/server.test.js index 4b0b8c990c..74957ff785 100644 --- a/appengine/metadata/flexible/test/server.test.js +++ b/appengine/metadata/flexible/test/server.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/metadata/standard/test/server.test.js b/appengine/metadata/standard/test/server.test.js index 4b0b8c990c..74957ff785 100644 --- a/appengine/metadata/standard/test/server.test.js +++ b/appengine/metadata/standard/test/server.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/pubsub/test/appListening.test.js +++ b/appengine/pubsub/test/appListening.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/redis/test/server.test.js b/appengine/redis/test/server.test.js index 4b0b8c990c..74957ff785 100644 --- a/appengine/redis/test/server.test.js +++ b/appengine/redis/test/server.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/sendgrid/test/appListening.test.js b/appengine/sendgrid/test/appListening.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/sendgrid/test/appListening.test.js +++ b/appengine/sendgrid/test/appListening.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/static-files/test/app.test.js b/appengine/static-files/test/app.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/static-files/test/app.test.js +++ b/appengine/static-files/test/app.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/typescript/package.json b/appengine/typescript/package.json index c32e10e7e1..7dc1c1d634 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": "mocha test/*.test.js", + "test": "mocha test/*.test.ts", "posttest": "npm run lint", "lint": "tslint -p .", "start": "node ./index.js", diff --git a/appengine/typescript/test/index.test.ts b/appengine/typescript/test/index.test.ts index 85e936b315..726501103e 100644 --- a/appengine/typescript/test/index.test.ts +++ b/appengine/typescript/test/index.test.ts @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'index.ts')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/websockets/test/app.test.js b/appengine/websockets/test/app.test.js index b4d0b7d6bb..9c09bc4e28 100644 --- a/appengine/websockets/test/app.test.js +++ b/appengine/websockets/test/app.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); +after(function() { + process.exit(0); +}) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/containerengine/hello-world/test/server.test.js b/containerengine/hello-world/test/server.test.js index 4b0b8c990c..7d84fc9dd9 100644 --- a/containerengine/hello-world/test/server.test.js +++ b/containerengine/hello-world/test/server.test.js @@ -2,6 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); +after(function() { + process.exit(0); + }) + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); From cc6251c341583fe5e460ec64dbd167a9f0bb865a Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 15:26:56 -0700 Subject: [PATCH 06/19] fix: add process.exit --- appengine/analytics/test/app.test.js | 6 +++--- appengine/building-an-app/build/test/server.test.js | 6 +++--- appengine/cloudsql/test/serverListening.test.js | 3 ++- .../cloudsql_postgresql/test/serverListening.test.js | 6 +++--- appengine/datastore/test/app.test.js | 6 +++--- appengine/endpoints/test/appListening.test.js | 8 ++++---- appengine/mailjet/test/app.test.js | 9 ++++----- appengine/memcached/test/app.test.js | 6 +++--- appengine/metadata/flexible/test/server.test.js | 6 +++--- appengine/metadata/standard/test/server.test.js | 6 +++--- appengine/pubsub/test/appListening.test.js | 6 +++--- appengine/redis/test/server.test.js | 6 +++--- appengine/sendgrid/test/appListening.test.js | 6 +++--- appengine/static-files/test/app.test.js | 6 +++--- .../typescript/test/{index.test.ts => index.test.js} | 2 +- appengine/websockets/test/app.test.js | 6 +++--- containerengine/hello-world/test/server.test.js | 8 ++++---- 17 files changed, 51 insertions(+), 51 deletions(-) rename appengine/typescript/test/{index.test.ts => index.test.js} (91%) diff --git a/appengine/analytics/test/app.test.js b/appengine/analytics/test/app.test.js index 9c09bc4e28..bb8c2d8316 100644 --- a/appengine/analytics/test/app.test.js +++ b/appengine/analytics/test/app.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/building-an-app/build/test/server.test.js b/appengine/building-an-app/build/test/server.test.js index 74957ff785..6e7b7f0c80 100644 --- a/appengine/building-an-app/build/test/server.test.js +++ b/appengine/building-an-app/build/test/server.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js index d6d128c379..8e1882665d 100644 --- a/appengine/cloudsql/test/serverListening.test.js +++ b/appengine/cloudsql/test/serverListening.test.js @@ -3,8 +3,9 @@ const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); after(function() { - process.exit(0); + process.exitCode(0); }) + it('should be listening', async () => { await supertest(app).get('/').expect(200) }); diff --git a/appengine/cloudsql_postgresql/test/serverListening.test.js b/appengine/cloudsql_postgresql/test/serverListening.test.js index 74957ff785..6e7b7f0c80 100644 --- a/appengine/cloudsql_postgresql/test/serverListening.test.js +++ b/appengine/cloudsql_postgresql/test/serverListening.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/datastore/test/app.test.js b/appengine/datastore/test/app.test.js index 9c09bc4e28..bb8c2d8316 100644 --- a/appengine/datastore/test/app.test.js +++ b/appengine/datastore/test/app.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js index 5f4a545b55..a268f275ea 100644 --- a/appengine/endpoints/test/appListening.test.js +++ b/appengine/endpoints/test/appListening.test.js @@ -2,10 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); - }) - +after(() => { + process.exitCode(0); +}); + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/mailjet/test/app.test.js b/appengine/mailjet/test/app.test.js index c87a803bff..bb8c2d8316 100644 --- a/appengine/mailjet/test/app.test.js +++ b/appengine/mailjet/test/app.test.js @@ -2,11 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); - }) - +after(() => { + process.exitCode(0); +}); + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); -ß \ No newline at end of file diff --git a/appengine/memcached/test/app.test.js b/appengine/memcached/test/app.test.js index 9c09bc4e28..bb8c2d8316 100644 --- a/appengine/memcached/test/app.test.js +++ b/appengine/memcached/test/app.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/metadata/flexible/test/server.test.js b/appengine/metadata/flexible/test/server.test.js index 74957ff785..6e7b7f0c80 100644 --- a/appengine/metadata/flexible/test/server.test.js +++ b/appengine/metadata/flexible/test/server.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/metadata/standard/test/server.test.js b/appengine/metadata/standard/test/server.test.js index 74957ff785..6e7b7f0c80 100644 --- a/appengine/metadata/standard/test/server.test.js +++ b/appengine/metadata/standard/test/server.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js index 9c09bc4e28..a268f275ea 100644 --- a/appengine/pubsub/test/appListening.test.js +++ b/appengine/pubsub/test/appListening.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/redis/test/server.test.js b/appengine/redis/test/server.test.js index 74957ff785..6e7b7f0c80 100644 --- a/appengine/redis/test/server.test.js +++ b/appengine/redis/test/server.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/sendgrid/test/appListening.test.js b/appengine/sendgrid/test/appListening.test.js index 9c09bc4e28..bb8c2d8316 100644 --- a/appengine/sendgrid/test/appListening.test.js +++ b/appengine/sendgrid/test/appListening.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/static-files/test/app.test.js b/appengine/static-files/test/app.test.js index 9c09bc4e28..bb8c2d8316 100644 --- a/appengine/static-files/test/app.test.js +++ b/appengine/static-files/test/app.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/typescript/test/index.test.ts b/appengine/typescript/test/index.test.js similarity index 91% rename from appengine/typescript/test/index.test.ts rename to appengine/typescript/test/index.test.js index 726501103e..db54abc794 100644 --- a/appengine/typescript/test/index.test.ts +++ b/appengine/typescript/test/index.test.js @@ -3,7 +3,7 @@ const path = require('path'); const app = require(path.join(__dirname, '../', 'index.ts')); after(function() { - process.exit(0); + process.exitCode(0); }) it('should be listening', async () => { diff --git a/appengine/websockets/test/app.test.js b/appengine/websockets/test/app.test.js index 9c09bc4e28..bb8c2d8316 100644 --- a/appengine/websockets/test/app.test.js +++ b/appengine/websockets/test/app.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(function() { - process.exit(0); -}) +after(() => { + process.exitCode(0); +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/containerengine/hello-world/test/server.test.js b/containerengine/hello-world/test/server.test.js index 7d84fc9dd9..211049b6c2 100644 --- a/containerengine/hello-world/test/server.test.js +++ b/containerengine/hello-world/test/server.test.js @@ -2,10 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { - process.exit(0); - }) - +after(() => { + process.exitCode(0); +}); + it('should be listening', async () => { await supertest(app).get('/').expect(200); }); From 7e7f0af2f83c6dd0349a0c8041350a4b80be908c Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 15:27:29 -0700 Subject: [PATCH 07/19] fix:n pm run lint --- appengine/cloudsql/test/serverListening.test.js | 6 +++--- appengine/endpoints/test/appListening.test.js | 2 +- appengine/pubsub/test/appListening.test.js | 2 +- appengine/typescript/test/index.test.js | 4 ++-- containerengine/hello-world/test/server.test.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js index 8e1882665d..6e7b7f0c80 100644 --- a/appengine/cloudsql/test/serverListening.test.js +++ b/appengine/cloudsql/test/serverListening.test.js @@ -2,10 +2,10 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); -after(function() { +after(() => { process.exitCode(0); -}) +}); it('should be listening', async () => { - await supertest(app).get('/').expect(200) + await supertest(app).get('/').expect(200); }); diff --git a/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js index a268f275ea..bb8c2d8316 100644 --- a/appengine/endpoints/test/appListening.test.js +++ b/appengine/endpoints/test/appListening.test.js @@ -3,7 +3,7 @@ const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); after(() => { - process.exitCode(0); + process.exitCode(0); }); it('should be listening', async () => { diff --git a/appengine/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js index a268f275ea..bb8c2d8316 100644 --- a/appengine/pubsub/test/appListening.test.js +++ b/appengine/pubsub/test/appListening.test.js @@ -3,7 +3,7 @@ const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); after(() => { - process.exitCode(0); + process.exitCode(0); }); it('should be listening', async () => { diff --git a/appengine/typescript/test/index.test.js b/appengine/typescript/test/index.test.js index db54abc794..913b7c725d 100644 --- a/appengine/typescript/test/index.test.js +++ b/appengine/typescript/test/index.test.js @@ -2,9 +2,9 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'index.ts')); -after(function() { +after(() => { process.exitCode(0); -}) +}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/containerengine/hello-world/test/server.test.js b/containerengine/hello-world/test/server.test.js index 211049b6c2..6e7b7f0c80 100644 --- a/containerengine/hello-world/test/server.test.js +++ b/containerengine/hello-world/test/server.test.js @@ -3,7 +3,7 @@ const path = require('path'); const app = require(path.join(__dirname, '../', 'server.js')); after(() => { - process.exitCode(0); + process.exitCode(0); }); it('should be listening', async () => { From 8be02eec9c8fdbbbb595c8b2f40ddb9c2338b144 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 16:49:46 -0700 Subject: [PATCH 08/19] try passing --- appengine/analytics/package.json | 2 +- appengine/analytics/test/app.test.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/appengine/analytics/package.json b/appengine/analytics/package.json index eb45bdf50d..8fd65d489c 100644 --- a/appengine/analytics/package.json +++ b/appengine/analytics/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "mocha test/*.test.js --exit --timeout=20000", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { diff --git a/appengine/analytics/test/app.test.js b/appengine/analytics/test/app.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/analytics/test/app.test.js +++ b/appengine/analytics/test/app.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); From bd52a1d3dab001744b4ffde4b538e5976170a0cd Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 17:04:28 -0700 Subject: [PATCH 09/19] try --- appengine/building-an-app/build/package.json | 5 +++-- appengine/building-an-app/build/test/server.test.js | 4 ---- appengine/cloudsql/package.json | 4 ++-- appengine/cloudsql/test/serverListening.test.js | 4 ---- appengine/cloudsql_postgresql/package.json | 2 +- appengine/cloudsql_postgresql/test/serverListening.test.js | 4 ---- appengine/datastore/package.json | 2 +- appengine/datastore/test/app.test.js | 4 ---- appengine/endpoints/package.json | 2 +- appengine/endpoints/test/appListening.test.js | 3 --- appengine/mailjet/app.js | 2 +- appengine/mailjet/package.json | 2 +- appengine/mailjet/test/app.test.js | 3 --- appengine/memcached/package.json | 2 +- appengine/memcached/test/app.test.js | 3 --- appengine/metadata/flexible/package.json | 2 +- appengine/metadata/flexible/test/server.test.js | 4 ---- appengine/metadata/standard/package.json | 2 +- appengine/metadata/standard/test/server.test.js | 3 --- appengine/pubsub/package.json | 2 +- appengine/pubsub/test/appListening.test.js | 3 --- appengine/sendgrid/test/appListening.test.js | 3 --- appengine/static-files/package.json | 2 +- appengine/static-files/test/app.test.js | 3 --- appengine/typescript/package.json | 2 +- appengine/typescript/test/index.test.js | 3 --- appengine/websockets/package.json | 2 +- appengine/websockets/test/app.test.js | 3 --- containerengine/hello-world/package.json | 2 +- containerengine/hello-world/test/server.test.js | 4 ---- endpoints/getting-started-grpc/package.json | 2 +- endpoints/getting-started/package.json | 2 +- 32 files changed, 20 insertions(+), 70 deletions(-) diff --git a/appengine/building-an-app/build/package.json b/appengine/building-an-app/build/package.json index 2878654841..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": "mocha test/*.test.js --exit --timeout=20000" + "test": "mocha --exit test/*.test.js" }, "repository": { "type": "git", @@ -23,7 +23,8 @@ }, "devDependencies": { "mocha": "^7.0.0", - "supertest": "^4.0.2" + "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 index 6e7b7f0c80..4b0b8c990c 100644 --- a/appengine/building-an-app/build/test/server.test.js +++ b/appengine/building-an-app/build/test/server.test.js @@ -2,10 +2,6 @@ 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/cloudsql/package.json b/appengine/cloudsql/package.json index 80c2b7287f..eb0e458388 100644 --- a/appengine/cloudsql/package.json +++ b/appengine/cloudsql/package.json @@ -13,9 +13,9 @@ "node": ">=8.0.0" }, "scripts": { - "unit-test": "mocha test/*.test.js --timeout=60000", + "unit-test": "mocha --exit test/*.test.js", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "repo-tools test app -- server.js", + "system-test": "mocha --exit test/*.test.js", "system-test-proxy": "npm run start-proxy; npm run system-test", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" diff --git a/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js index 6e7b7f0c80..4b0b8c990c 100644 --- a/appengine/cloudsql/test/serverListening.test.js +++ b/appengine/cloudsql/test/serverListening.test.js @@ -2,10 +2,6 @@ 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/cloudsql_postgresql/package.json b/appengine/cloudsql_postgresql/package.json index 70f4a181c4..17cfe9f305 100644 --- a/appengine/cloudsql_postgresql/package.json +++ b/appengine/cloudsql_postgresql/package.json @@ -15,7 +15,7 @@ "scripts": { "unit-test": "mocha test/*.test.js --timeout=30000", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "mocha test/serverListening.test.js --timeout=30000", + "system-test": "mocha --exit test/*.test.js", "system-test-proxy": "npm run start-proxy; npm run system-test", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" diff --git a/appengine/cloudsql_postgresql/test/serverListening.test.js b/appengine/cloudsql_postgresql/test/serverListening.test.js index 6e7b7f0c80..4b0b8c990c 100644 --- a/appengine/cloudsql_postgresql/test/serverListening.test.js +++ b/appengine/cloudsql_postgresql/test/serverListening.test.js @@ -2,10 +2,6 @@ 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/datastore/package.json b/appengine/datastore/package.json index 58bbf7e064..7845ac9d37 100644 --- a/appengine/datastore/package.json +++ b/appengine/datastore/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "mocha test/*.test.js --timeout=30000", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { diff --git a/appengine/datastore/test/app.test.js b/appengine/datastore/test/app.test.js index bb8c2d8316..b4d0b7d6bb 100644 --- a/appengine/datastore/test/app.test.js +++ b/appengine/datastore/test/app.test.js @@ -2,10 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); - it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/endpoints/package.json b/appengine/endpoints/package.json index 3017a696b2..dfc7dedf83 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -16,7 +16,7 @@ "deploy": "gcloud app deploy", "start": "node app.js", "unit-test": "mocha test/app.test.js --timeout=60000 --exit", - "system-test": "mocha test/appListening.test.js --timeout=60000 --exit", + "system-test": "mocha --exit test/appListening.test.js", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" }, diff --git a/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/endpoints/test/appListening.test.js +++ b/appengine/endpoints/test/appListening.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/mailjet/app.js b/appengine/mailjet/app.js index 5ccfbb1602..dbd96c49c7 100644 --- a/appengine/mailjet/app.js +++ b/appengine/mailjet/app.js @@ -26,7 +26,7 @@ const Mailjet = require('node-mailjet').connect( // [END gae_flex_mailjet_config] const app = express(); - +ß // Setup view engine app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); diff --git a/appengine/mailjet/package.json b/appengine/mailjet/package.json index 5e337de463..6c489eed06 100644 --- a/appengine/mailjet/package.json +++ b/appengine/mailjet/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "system-test": "mocha test/*.test.js --timeout=60000 --exit", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { diff --git a/appengine/mailjet/test/app.test.js b/appengine/mailjet/test/app.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/mailjet/test/app.test.js +++ b/appengine/mailjet/test/app.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/memcached/package.json b/appengine/memcached/package.json index 3c1699a9b1..ef9c1c6318 100644 --- a/appengine/memcached/package.json +++ b/appengine/memcached/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha test/*.test.js --timeout=60000 --exit" + "test": "mocha --exit test/*.test.js" }, "dependencies": { "express": "^4.16.4", diff --git a/appengine/memcached/test/app.test.js b/appengine/memcached/test/app.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/memcached/test/app.test.js +++ b/appengine/memcached/test/app.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/metadata/flexible/package.json b/appengine/metadata/flexible/package.json index a18b50cfb7..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": "mocha test/ --timeout=60000 --exit", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { diff --git a/appengine/metadata/flexible/test/server.test.js b/appengine/metadata/flexible/test/server.test.js index 6e7b7f0c80..4b0b8c990c 100644 --- a/appengine/metadata/flexible/test/server.test.js +++ b/appengine/metadata/flexible/test/server.test.js @@ -2,10 +2,6 @@ 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/metadata/standard/package.json b/appengine/metadata/standard/package.json index 4171ddf40a..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": "mocha test/ --timeout=60000 --exit", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": { diff --git a/appengine/metadata/standard/test/server.test.js b/appengine/metadata/standard/test/server.test.js index 6e7b7f0c80..aeb3abcc67 100644 --- a/appengine/metadata/standard/test/server.test.js +++ b/appengine/metadata/standard/test/server.test.js @@ -2,9 +2,6 @@ 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/pubsub/package.json b/appengine/pubsub/package.json index a21ecca1ac..a1c4b3b5c3 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha test/*.test.js --timeout=30000 --exit" + "test": "mocha --exit test/*.test.js" }, "dependencies": { "@google-cloud/pubsub": "^1.0.0", diff --git a/appengine/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/pubsub/test/appListening.test.js +++ b/appengine/pubsub/test/appListening.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/sendgrid/test/appListening.test.js b/appengine/sendgrid/test/appListening.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/sendgrid/test/appListening.test.js +++ b/appengine/sendgrid/test/appListening.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/static-files/package.json b/appengine/static-files/package.json index c61c5df063..7b36e14833 100644 --- a/appengine/static-files/package.json +++ b/appengine/static-files/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha test/*.test.js --url localhost:8080/static/main.css" + "test": "mocha --exit test/*.test.js --url localhost:8080/static/main.css" }, "cloud-repo-tools": { "test": { diff --git a/appengine/static-files/test/app.test.js b/appengine/static-files/test/app.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/static-files/test/app.test.js +++ b/appengine/static-files/test/app.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/typescript/package.json b/appengine/typescript/package.json index 7dc1c1d634..4267b2e977 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": "mocha test/*.test.ts", + "test": "mocha --exit test/*.test.js", "posttest": "npm run lint", "lint": "tslint -p .", "start": "node ./index.js", diff --git a/appengine/typescript/test/index.test.js b/appengine/typescript/test/index.test.js index 913b7c725d..3c90467128 100644 --- a/appengine/typescript/test/index.test.js +++ b/appengine/typescript/test/index.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'index.ts')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/appengine/websockets/package.json b/appengine/websockets/package.json index cbe09777e0..43a6d6333e 100644 --- a/appengine/websockets/package.json +++ b/appengine/websockets/package.json @@ -13,7 +13,7 @@ "start": "node app.js", "lint": "eslint .", "fix": "eslint --fix .", - "test": "mocha test/*.test.js --timeout=30000 --exit", + "test": "mocha --exit test/*.test.js", "e2e-test": "samples test deploy" }, "dependencies": { diff --git a/appengine/websockets/test/app.test.js b/appengine/websockets/test/app.test.js index bb8c2d8316..0624e502a6 100644 --- a/appengine/websockets/test/app.test.js +++ b/appengine/websockets/test/app.test.js @@ -2,9 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'app.js')); -after(() => { - process.exitCode(0); -}); it('should be listening', async () => { await supertest(app).get('/').expect(200); diff --git a/containerengine/hello-world/package.json b/containerengine/hello-world/package.json index a4f251be6a..ae3f827a34 100644 --- a/containerengine/hello-world/package.json +++ b/containerengine/hello-world/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node server.js", - "system-test": "mocha test/*.test.js --timeout=30000 --exit", + "system-test": "mocha --exit test/*.test.js", "test": "npm run system-test" }, "dependencies": {}, diff --git a/containerengine/hello-world/test/server.test.js b/containerengine/hello-world/test/server.test.js index 6e7b7f0c80..4b0b8c990c 100644 --- a/containerengine/hello-world/test/server.test.js +++ b/containerengine/hello-world/test/server.test.js @@ -2,10 +2,6 @@ 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/endpoints/getting-started-grpc/package.json b/endpoints/getting-started-grpc/package.json index d68f040711..86ade9f655 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": "mocha system-test/*.test.js --timeout=60000" + "test": "mocha --exit system-test/*.test.js" }, "dependencies": { "google-auth-library": "^5.0.0", diff --git a/endpoints/getting-started/package.json b/endpoints/getting-started/package.json index 270f3373de..1595a64769 100644 --- a/endpoints/getting-started/package.json +++ b/endpoints/getting-started/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha test/*.test.js --timeout=20000" + "test": "mocha --exit test/*.test.js" }, "dependencies": { "body-parser": "^1.18.3", From bc828464af67ef8cbd9824b0e4513d00d08169a6 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 17:12:34 -0700 Subject: [PATCH 10/19] try something --- appengine/cloudsql/test/serverListening.test.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js index 4b0b8c990c..5aabf954eb 100644 --- a/appengine/cloudsql/test/serverListening.test.js +++ b/appengine/cloudsql/test/serverListening.test.js @@ -1,7 +1,11 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'server.js')); +const app = require('../server'); -it('should be listening', async () => { - await supertest(app).get('/').expect(200); +const request = require('supertest'); + +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); }); From bd0c4ddcf9216614b658b77273f88ae4cff13eb9 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 17:20:31 -0700 Subject: [PATCH 11/19] try --- appengine/endpoints/test/appListening.test.js | 13 ++++++++----- appengine/mailjet/test/app.test.js | 13 ++++++++----- appengine/memcached/test/app.test.js | 13 ++++++++----- appengine/pubsub/test/appListening.test.js | 13 ++++++++----- 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js index 0624e502a6..6e6ea2effb 100644 --- a/appengine/endpoints/test/appListening.test.js +++ b/appengine/endpoints/test/appListening.test.js @@ -1,8 +1,11 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'app.js')); +const app = require('../app'); +const request = require('supertest'); -it('should be listening', async () => { - await supertest(app).get('/').expect(200); +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); }); diff --git a/appengine/mailjet/test/app.test.js b/appengine/mailjet/test/app.test.js index 0624e502a6..6e6ea2effb 100644 --- a/appengine/mailjet/test/app.test.js +++ b/appengine/mailjet/test/app.test.js @@ -1,8 +1,11 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'app.js')); +const app = require('../app'); +const request = require('supertest'); -it('should be listening', async () => { - await supertest(app).get('/').expect(200); +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); }); diff --git a/appengine/memcached/test/app.test.js b/appengine/memcached/test/app.test.js index 0624e502a6..6e6ea2effb 100644 --- a/appengine/memcached/test/app.test.js +++ b/appengine/memcached/test/app.test.js @@ -1,8 +1,11 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'app.js')); +const app = require('../app'); +const request = require('supertest'); -it('should be listening', async () => { - await supertest(app).get('/').expect(200); +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); }); diff --git a/appengine/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js index 0624e502a6..6e6ea2effb 100644 --- a/appengine/pubsub/test/appListening.test.js +++ b/appengine/pubsub/test/appListening.test.js @@ -1,8 +1,11 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'app.js')); +const app = require('../app'); +const request = require('supertest'); -it('should be listening', async () => { - await supertest(app).get('/').expect(200); +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); }); From 56ae1a888633f9408987bcb272b66420bc252f25 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 17:31:10 -0700 Subject: [PATCH 12/19] push --- appengine/analytics/test/app.test.js | 1 - appengine/mailjet/app.js | 2 +- appengine/metadata/standard/test/server.test.js | 1 - appengine/sendgrid/test/appListening.test.js | 1 - appengine/static-files/test/app.test.js | 1 - appengine/typescript/test/index.test.js | 1 - appengine/websockets/test/app.test.js | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/appengine/analytics/test/app.test.js b/appengine/analytics/test/app.test.js index 0624e502a6..b4d0b7d6bb 100644 --- a/appengine/analytics/test/app.test.js +++ b/appengine/analytics/test/app.test.js @@ -2,7 +2,6 @@ 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/mailjet/app.js b/appengine/mailjet/app.js index dbd96c49c7..5ccfbb1602 100644 --- a/appengine/mailjet/app.js +++ b/appengine/mailjet/app.js @@ -26,7 +26,7 @@ const Mailjet = require('node-mailjet').connect( // [END gae_flex_mailjet_config] const app = express(); -ß + // Setup view engine app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); diff --git a/appengine/metadata/standard/test/server.test.js b/appengine/metadata/standard/test/server.test.js index aeb3abcc67..4b0b8c990c 100644 --- a/appengine/metadata/standard/test/server.test.js +++ b/appengine/metadata/standard/test/server.test.js @@ -2,7 +2,6 @@ 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/sendgrid/test/appListening.test.js b/appengine/sendgrid/test/appListening.test.js index 0624e502a6..b4d0b7d6bb 100644 --- a/appengine/sendgrid/test/appListening.test.js +++ b/appengine/sendgrid/test/appListening.test.js @@ -2,7 +2,6 @@ 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/test/app.test.js b/appengine/static-files/test/app.test.js index 0624e502a6..b4d0b7d6bb 100644 --- a/appengine/static-files/test/app.test.js +++ b/appengine/static-files/test/app.test.js @@ -2,7 +2,6 @@ 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/typescript/test/index.test.js b/appengine/typescript/test/index.test.js index 3c90467128..85e936b315 100644 --- a/appengine/typescript/test/index.test.js +++ b/appengine/typescript/test/index.test.js @@ -2,7 +2,6 @@ const supertest = require('supertest'); const path = require('path'); const app = require(path.join(__dirname, '../', 'index.ts')); - it('should be listening', async () => { await supertest(app).get('/').expect(200); }); diff --git a/appengine/websockets/test/app.test.js b/appengine/websockets/test/app.test.js index 0624e502a6..b4d0b7d6bb 100644 --- a/appengine/websockets/test/app.test.js +++ b/appengine/websockets/test/app.test.js @@ -2,7 +2,6 @@ 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); }); From 3e1b20141c9a735d03433fd85176e3f168eec22c Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 17:52:48 -0700 Subject: [PATCH 13/19] try something --- appengine/cloudsql/package.json | 4 ++-- appengine/endpoints/test/appListening.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appengine/cloudsql/package.json b/appengine/cloudsql/package.json index eb0e458388..348bc9ae43 100644 --- a/appengine/cloudsql/package.json +++ b/appengine/cloudsql/package.json @@ -13,9 +13,9 @@ "node": ">=8.0.0" }, "scripts": { - "unit-test": "mocha --exit test/*.test.js", + "unit-test": "mocha --exit test/createTables.test.js; mocha --exit server.test.js", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "mocha --exit test/*.test.js", + "system-test": "mocha --exit test/serverListening.test.js", "system-test-proxy": "npm run start-proxy; npm run system-test", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" diff --git a/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js index 6e6ea2effb..9cd7f6ccc6 100644 --- a/appengine/endpoints/test/appListening.test.js +++ b/appengine/endpoints/test/appListening.test.js @@ -1,4 +1,4 @@ -const app = require('../app'); +const app = require('../app.js'); const request = require('supertest'); From fbd2f2a2900539e3b4270f7fa95ad2d1a336c7db Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 18:06:35 -0700 Subject: [PATCH 14/19] check --- .../test/serverListening.test.js | 14 +++++++++----- appengine/pubsub/package.json | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/appengine/cloudsql_postgresql/test/serverListening.test.js b/appengine/cloudsql_postgresql/test/serverListening.test.js index 4b0b8c990c..5aabf954eb 100644 --- a/appengine/cloudsql_postgresql/test/serverListening.test.js +++ b/appengine/cloudsql_postgresql/test/serverListening.test.js @@ -1,7 +1,11 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'server.js')); +const app = require('../server'); -it('should be listening', async () => { - await supertest(app).get('/').expect(200); +const request = require('supertest'); + +describe('start app', () => { + describe('GET /', () => { + it('should get 200', (done) => { + request(app).get('/').expect(200, done); + }); + }); }); diff --git a/appengine/pubsub/package.json b/appengine/pubsub/package.json index a1c4b3b5c3..7918f0086f 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha --exit test/*.test.js" + "test": "repo-tools test app && mocha test/app.test.js --timeout=30000 --exit" }, "dependencies": { "@google-cloud/pubsub": "^1.0.0", From f84c14e5813694fcc7366dcdad9305154c1400ad Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 27 Mar 2020 18:16:53 -0700 Subject: [PATCH 15/19] try --- appengine/pubsub/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/appengine/pubsub/package.json b/appengine/pubsub/package.json index 7918f0086f..96fcb88ef3 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -20,6 +20,7 @@ "pug": "^2.0.1" }, "devDependencies": { + "@google-cloud/nodejs-repo-tools": "^3.3.0", "jsonwebtoken": "^8.5.1", "mocha": "^7.0.0", "sinon": "^9.0.0", From 9f68c5f702421520c7b12e02f5d97f45c297a1dd Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Mon, 30 Mar 2020 15:23:15 -0700 Subject: [PATCH 16/19] fix: submit only passing tests: --- appengine/cloudsql/package.json | 4 ++-- appengine/cloudsql/test/serverListening.test.js | 11 ----------- appengine/cloudsql_postgresql/package.json | 3 ++- appengine/endpoints/test/appListening.test.js | 11 ----------- appengine/memcached/app.js | 1 - appengine/memcached/package.json | 5 ++--- appengine/memcached/test/app.test.js | 11 ----------- appengine/pubsub/test/appListening.test.js | 11 ----------- appengine/typescript/package.json | 3 ++- appengine/typescript/test/index.test.js | 7 ------- 10 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 appengine/cloudsql/test/serverListening.test.js delete mode 100644 appengine/endpoints/test/appListening.test.js delete mode 100644 appengine/memcached/test/app.test.js delete mode 100644 appengine/pubsub/test/appListening.test.js delete mode 100644 appengine/typescript/test/index.test.js diff --git a/appengine/cloudsql/package.json b/appengine/cloudsql/package.json index 348bc9ae43..80c2b7287f 100644 --- a/appengine/cloudsql/package.json +++ b/appengine/cloudsql/package.json @@ -13,9 +13,9 @@ "node": ">=8.0.0" }, "scripts": { - "unit-test": "mocha --exit test/createTables.test.js; mocha --exit server.test.js", + "unit-test": "mocha test/*.test.js --timeout=60000", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "mocha --exit test/serverListening.test.js", + "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": "npm -- run all-test" diff --git a/appengine/cloudsql/test/serverListening.test.js b/appengine/cloudsql/test/serverListening.test.js deleted file mode 100644 index 5aabf954eb..0000000000 --- a/appengine/cloudsql/test/serverListening.test.js +++ /dev/null @@ -1,11 +0,0 @@ -const app = require('../server'); - -const request = require('supertest'); - -describe('start app', () => { - describe('GET /', () => { - it('should get 200', (done) => { - request(app).get('/').expect(200, done); - }); - }); -}); diff --git a/appengine/cloudsql_postgresql/package.json b/appengine/cloudsql_postgresql/package.json index 17cfe9f305..baf3644e6b 100644 --- a/appengine/cloudsql_postgresql/package.json +++ b/appengine/cloudsql_postgresql/package.json @@ -15,7 +15,7 @@ "scripts": { "unit-test": "mocha test/*.test.js --timeout=30000", "start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &", - "system-test": "mocha --exit test/*.test.js", + "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": "npm -- run all-test" @@ -27,6 +27,7 @@ "prompt": "^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/appengine/endpoints/test/appListening.test.js b/appengine/endpoints/test/appListening.test.js deleted file mode 100644 index 9cd7f6ccc6..0000000000 --- a/appengine/endpoints/test/appListening.test.js +++ /dev/null @@ -1,11 +0,0 @@ -const app = require('../app.js'); - -const request = require('supertest'); - -describe('start app', () => { - describe('GET /', () => { - it('should get 200', (done) => { - request(app).get('/').expect(200, done); - }); - }); -}); diff --git a/appengine/memcached/app.js b/appengine/memcached/app.js index 2576076f2b..5c346a85a1 100644 --- a/appengine/memcached/app.js +++ b/appengine/memcached/app.js @@ -48,4 +48,3 @@ app.listen(PORT, () => { console.log('Press Ctrl+C to quit.'); }); -module.exports = app; diff --git a/appengine/memcached/package.json b/appengine/memcached/package.json index ef9c1c6318..021dffe7a0 100644 --- a/appengine/memcached/package.json +++ b/appengine/memcached/package.json @@ -10,14 +10,13 @@ }, "scripts": { "start": "node app.js", - "test": "mocha --exit test/*.test.js" + "test": "repo-tools test app" }, "dependencies": { "express": "^4.16.4", "memjs": "^1.2.0" }, "devDependencies": { - "mocha": "^7.0.0", - "supertest": "^4.0.2" + "@google-cloud/nodejs-repo-tools": "^3.3.0" } } diff --git a/appengine/memcached/test/app.test.js b/appengine/memcached/test/app.test.js deleted file mode 100644 index 6e6ea2effb..0000000000 --- a/appengine/memcached/test/app.test.js +++ /dev/null @@ -1,11 +0,0 @@ -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/pubsub/test/appListening.test.js b/appengine/pubsub/test/appListening.test.js deleted file mode 100644 index 6e6ea2effb..0000000000 --- a/appengine/pubsub/test/appListening.test.js +++ /dev/null @@ -1,11 +0,0 @@ -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/typescript/package.json b/appengine/typescript/package.json index 4267b2e977..6aae002722 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": "mocha --exit test/*.test.js", + "test": "repo-tools test app -- index.js", "posttest": "npm run lint", "lint": "tslint -p .", "start": "node ./index.js", @@ -23,6 +23,7 @@ "typescript": "^3.0.1" }, "devDependencies": { + "@google-cloud/nodejs-repo-tools": "^3.3.0", "@types/express": "^4.16.0", "tslint": "^6.0.0", "mocha": "^7.0.0", diff --git a/appengine/typescript/test/index.test.js b/appengine/typescript/test/index.test.js deleted file mode 100644 index 85e936b315..0000000000 --- a/appengine/typescript/test/index.test.js +++ /dev/null @@ -1,7 +0,0 @@ -const supertest = require('supertest'); -const path = require('path'); -const app = require(path.join(__dirname, '../', 'index.ts')); - -it('should be listening', async () => { - await supertest(app).get('/').expect(200); -}); From df3c56965b1504e7ea959b8717ae1c5bb7c09a5f Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Mon, 30 Mar 2020 15:33:24 -0700 Subject: [PATCH 17/19] fix: failling tests --- appengine/endpoints/package.json | 3 +-- appengine/memcached/app.js | 1 - appengine/typescript/index.ts | 2 -- appengine/typescript/package.json | 4 +--- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/appengine/endpoints/package.json b/appengine/endpoints/package.json index dfc7dedf83..b70dfb38fe 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -15,8 +15,7 @@ "scripts": { "deploy": "gcloud app deploy", "start": "node app.js", - "unit-test": "mocha test/app.test.js --timeout=60000 --exit", - "system-test": "mocha --exit test/appListening.test.js", + "unit-test": "mocha test/*.test.js --timeout=60000 --exit", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" }, diff --git a/appengine/memcached/app.js b/appengine/memcached/app.js index 5c346a85a1..3ba83e99a5 100644 --- a/appengine/memcached/app.js +++ b/appengine/memcached/app.js @@ -47,4 +47,3 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); - diff --git a/appengine/typescript/index.ts b/appengine/typescript/index.ts index af248008bf..d2c974876b 100644 --- a/appengine/typescript/index.ts +++ b/appengine/typescript/index.ts @@ -24,5 +24,3 @@ app.get("/", (req, res) => { app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); }); - -module.exports = app; \ No newline at end of file diff --git a/appengine/typescript/package.json b/appengine/typescript/package.json index 6aae002722..c9fa20e9fd 100644 --- a/appengine/typescript/package.json +++ b/appengine/typescript/package.json @@ -25,8 +25,6 @@ "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.3.0", "@types/express": "^4.16.0", - "tslint": "^6.0.0", - "mocha": "^7.0.0", - "supertest": "^4.0.2" + "tslint": "^6.0.0" } } From c12ea393a3f3649079ce15a3b99e552fd15ec0c9 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Mon, 30 Mar 2020 16:06:35 -0700 Subject: [PATCH 18/19] fix: failling tests --- appengine/endpoints/package.json | 6 ++++-- appengine/typescript/index.ts | 3 +-- endpoints/getting-started-grpc/package.json | 2 +- endpoints/getting-started/package.json | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/appengine/endpoints/package.json b/appengine/endpoints/package.json index b70dfb38fe..2d5de6c768 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -15,15 +15,17 @@ "scripts": { "deploy": "gcloud app deploy", "start": "node app.js", - "unit-test": "mocha test/*.test.js --timeout=60000 --exit", + "unit-test": "mocha test/ --timeout=60000 --exit", + "system-test": "repo-tools test app", "all-test": "npm run unit-test && npm run system-test", - "test": "npm -- run all-test" + "test": "repo-tools test run --cmd npm -- run all-test" }, "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/appengine/typescript/index.ts b/appengine/typescript/index.ts index d2c974876b..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; -const express = require('express'); - const app = express(); app.get("/", (req, res) => { diff --git a/endpoints/getting-started-grpc/package.json b/endpoints/getting-started-grpc/package.json index eed81abf45..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": "mocha --exit system-test/*.test.js" + "test": "mocha --exit system-test/*.test.js --timeout=60000" }, "dependencies": { "google-auth-library": "^6.0.0", diff --git a/endpoints/getting-started/package.json b/endpoints/getting-started/package.json index 1595a64769..adaf983471 100644 --- a/endpoints/getting-started/package.json +++ b/endpoints/getting-started/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "test": "mocha --exit test/*.test.js" + "test": "mocha -- test/*.test.js --timeout=20000" }, "dependencies": { "body-parser": "^1.18.3", From 4c96231e5971b62be7448a8f88fdd0f97f9aca62 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Mon, 30 Mar 2020 16:23:25 -0700 Subject: [PATCH 19/19] fix cloudsql_postgresql tests --- .../cloudsql_postgresql/test/serverListening.test.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 appengine/cloudsql_postgresql/test/serverListening.test.js diff --git a/appengine/cloudsql_postgresql/test/serverListening.test.js b/appengine/cloudsql_postgresql/test/serverListening.test.js deleted file mode 100644 index 5aabf954eb..0000000000 --- a/appengine/cloudsql_postgresql/test/serverListening.test.js +++ /dev/null @@ -1,11 +0,0 @@ -const app = require('../server'); - -const request = require('supertest'); - -describe('start app', () => { - describe('GET /', () => { - it('should get 200', (done) => { - request(app).get('/').expect(200, done); - }); - }); -});