From 6568a1babd307cfb0c8e9cdccf003e696eb60a34 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Wed, 27 Nov 2019 12:43:32 -0500 Subject: [PATCH] cleanup: delete unused variables in functions/helloworld --- functions/helloworld/package.json | 1 - functions/helloworld/test/index.test.js | 11 ----------- .../helloworld/test/sample.system.pubsub.test.js | 1 - .../helloworld/test/sample.system.storage.test.js | 1 - 4 files changed, 14 deletions(-) diff --git a/functions/helloworld/package.json b/functions/helloworld/package.json index 676e9f9059..9974e1666a 100644 --- a/functions/helloworld/package.json +++ b/functions/helloworld/package.json @@ -28,7 +28,6 @@ "@google-cloud/pubsub": "^1.0.0", "@google-cloud/storage": "^4.0.0", "child-process-promise": "^2.2.1", - "delay": "^4.3.0", "express": "^4.16.3", "mocha": "^6.1.4", "moment": "^2.24.0", diff --git a/functions/helloworld/test/index.test.js b/functions/helloworld/test/index.test.js index 89c95a01e7..1ccc5ec6b8 100644 --- a/functions/helloworld/test/index.test.js +++ b/functions/helloworld/test/index.test.js @@ -21,19 +21,8 @@ const sinon = require('sinon'); const execPromise = require('child-process-promise').exec; const program = require('..'); - -const {PubSub} = require('@google-cloud/pubsub'); -const pubsub = new PubSub(); -const {Storage} = require('@google-cloud/storage'); -const storage = new Storage(); - -const topicName = process.env.FUNCTIONS_TOPIC; - -const localFileName = 'test.txt'; const fileName = `test-${uuid.v4()}.txt`; - const bucketName = process.env.FUNCTIONS_BUCKET; -const bucket = storage.bucket(bucketName); const startFF = (target, signature, port) => { const cwd = path.join(__dirname, '..'); diff --git a/functions/helloworld/test/sample.system.pubsub.test.js b/functions/helloworld/test/sample.system.pubsub.test.js index e1f010593b..8fa68504ad 100644 --- a/functions/helloworld/test/sample.system.pubsub.test.js +++ b/functions/helloworld/test/sample.system.pubsub.test.js @@ -14,7 +14,6 @@ // [START functions_pubsub_system_test] const childProcess = require('child_process'); -const delay = require('delay'); const assert = require('assert'); const uuid = require('uuid'); const {PubSub} = require('@google-cloud/pubsub'); diff --git a/functions/helloworld/test/sample.system.storage.test.js b/functions/helloworld/test/sample.system.storage.test.js index 971b78944c..13fea47f14 100644 --- a/functions/helloworld/test/sample.system.storage.test.js +++ b/functions/helloworld/test/sample.system.storage.test.js @@ -19,7 +19,6 @@ const uuid = require('uuid'); const assert = require('assert'); const path = require('path'); const childProcess = require('child_process'); -const delay = require('delay'); const moment = require('moment'); const promiseRetry = require('promise-retry');