From 4b3ea81028ae6dcbe3a4738dca7522b62685bb42 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 23 Jan 2024 16:30:15 +0000 Subject: [PATCH] fix(Google Drive Node): Fix issue preventing upload / update working in some configurations (#8417) --- .../nodes/Google/Drive/test/v2/node/file/copy.test.ts | 2 +- .../Google/Drive/test/v2/node/file/createFromText.test.ts | 2 +- .../nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts | 2 +- .../nodes/Google/Drive/test/v2/node/file/move.test.ts | 2 +- .../nodes/Google/Drive/test/v2/node/file/share.test.ts | 2 +- .../nodes/Google/Drive/test/v2/node/file/update.test.ts | 2 +- .../nodes/Google/Drive/test/v2/node/file/upload.test.ts | 4 ++-- .../nodes/Google/Drive/v2/actions/file/update.operation.ts | 2 +- .../nodes/Google/Drive/v2/actions/file/upload.operation.ts | 3 ++- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts index 56e224b980b4f..ddc4891cbf0ee 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts @@ -26,7 +26,7 @@ describe('test GoogleDriveV2: file copy', () => { jest.unmock('../../../../v2/transport'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { operation: 'copy', fileId: { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts index a9feae664231e..9589ae359d24e 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts @@ -26,7 +26,7 @@ describe('test GoogleDriveV2: file createFromText', () => { jest.unmock('../../../../v2/transport'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { operation: 'createFromText', content: 'hello drive!', diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts index 44f4d5e3ab891..cbfd2edf6b70b 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts @@ -26,7 +26,7 @@ describe('test GoogleDriveV2: file deleteFile', () => { jest.unmock('../../../../v2/transport'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { operation: 'deleteFile', fileId: { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts index 11aeb32adcf43..a3665a4df7fdb 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts @@ -31,7 +31,7 @@ describe('test GoogleDriveV2: file move', () => { jest.unmock('../../../../v2/transport'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { operation: 'move', fileId: { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts index e69ab0adf06a9..c7111f4e94bfc 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts @@ -26,7 +26,7 @@ describe('test GoogleDriveV2: file share', () => { jest.unmock('../../../../v2/transport'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { operation: 'share', fileId: { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts index f21a02f02e573..868f727a47e3a 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts @@ -26,7 +26,7 @@ describe('test GoogleDriveV2: file update', () => { jest.unmock('../../../../v2/transport'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { operation: 'update', fileId: { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts index fdd6e30f68f39..54c93caa66240 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts @@ -48,7 +48,7 @@ describe('test GoogleDriveV2: file upload', () => { jest.unmock('../../../../v2/helpers/utils'); }); - it('shuold be called with', async () => { + it('should be called with', async () => { const nodeParameters = { name: 'newFile.txt', folderId: { @@ -75,7 +75,7 @@ describe('test GoogleDriveV2: file upload', () => { undefined, { uploadType: 'resumable' }, undefined, - { resolveWithFullResponse: true }, + { returnFullResponse: true }, ); expect(transport.googleApiRequest).toHaveBeenCalledWith( 'PATCH', diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts index 367157fa907f6..3c3eb3940a44e 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts @@ -203,7 +203,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise