fix storage test
This commit is contained in:
@@ -40,7 +40,7 @@ const assert = require('assert'),
|
||||
let GCS = require('@google-cloud/storage').Storage;
|
||||
|
||||
// test only
|
||||
var originalGCS;
|
||||
let originalGCS;
|
||||
function mockInject(mock) {
|
||||
originalGCS = GCS;
|
||||
GCS = mock;
|
||||
@@ -54,7 +54,7 @@ function mockRestore() {
|
||||
function getBucket(apiConfig) {
|
||||
assert.strictEqual(typeof apiConfig, 'object');
|
||||
|
||||
var gcsConfig = {
|
||||
const gcsConfig = {
|
||||
projectId: apiConfig.projectId,
|
||||
|
||||
credentials: {
|
||||
@@ -95,7 +95,7 @@ function upload(apiConfig, backupFilePath, sourceStream, callback) {
|
||||
callback(null);
|
||||
}
|
||||
|
||||
var uploadStream = getBucket(apiConfig).file(backupFilePath)
|
||||
const uploadStream = getBucket(apiConfig).file(backupFilePath)
|
||||
.createWriteStream({resumable: false})
|
||||
.on('finish', done)
|
||||
.on('error', done);
|
||||
|
||||
Reference in New Issue
Block a user