Skip to content

Commit 3bef808

Browse files
committed
fix(storage): gaxios migration system test fix
1 parent b2e12e7 commit 3bef808

4 files changed

Lines changed: 314 additions & 107 deletions

File tree

handwritten/storage/system-test/fixtures/index-cjs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// eslint-disable-next-line no-undef
15+
/* eslint-disable node/no-missing-require, no-unused-vars, no-undef */
1616
const {Storage} = require('@google-cloud/storage');
1717

1818
function main() {
19-
// eslint-disable-next-line no-unused-vars
2019
const storage = new Storage();
2120
}
2221

handwritten/storage/system-test/fixtures/index-esm.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// eslint-disable-next-line no-undef
16-
const {Storage} = require('@google-cloud/storage');
15+
/* eslint-disable node/no-missing-import, no-unused-vars */
16+
import {Storage} from '@google-cloud/storage';
1717

1818
function main() {
19-
// eslint-disable-next-line no-unused-vars
2019
const storage = new Storage();
2120
}
2221

handwritten/storage/system-test/kitchen.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ describe('resumable-upload', () => {
5555
retryableErrorFn: RETRYABLE_ERR_FN_DEFAULT,
5656
};
5757

58-
const bucket = new Storage({retryOptions}).bucket(bucketName);
58+
const bucket = new Storage({
59+
projectId: process.env.PROJECT_ID,
60+
retryOptions: retryOptions,
61+
}).bucket(bucketName);
5962
let filePath: string;
6063

6164
before(async () => {
@@ -97,7 +100,7 @@ describe('resumable-upload', () => {
97100
// see: https://cloud.google.com/storage/docs/exponential-backoff:
98101
const ms = Math.pow(2, retries) * 1000 + Math.random() * 2000;
99102
console.info(`retrying "${title}" in ${ms}ms`);
100-
setTimeout(done(), ms);
103+
setTimeout(() => done(), ms);
101104
}
102105

103106
it('should work', done => {

0 commit comments

Comments
 (0)