Skip to content

Commit

Permalink
fix(Google Drive Node): Fix issue preventing upload / update working …
Browse files Browse the repository at this point in the history
…in some configurations (#8417)
  • Loading branch information
Joffcom authored Jan 23, 2024
1 parent a8b4684 commit 4b3ea81
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -75,7 +75,7 @@ describe('test GoogleDriveV2: file upload', () => {
undefined,
{ uploadType: 'resumable' },
undefined,
{ resolveWithFullResponse: true },
{ returnFullResponse: true },
);
expect(transport.googleApiRequest).toHaveBeenCalledWith(
'PATCH',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
{ uploadType: 'resumable' },
undefined,
{
resolveWithFullResponse: true,
returnFullResponse: true,
},
);
const uploadUrl = resumableUpload.headers.location;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
{ uploadType: 'resumable' },
undefined,
{
resolveWithFullResponse: true,
returnFullResponse: true,
},
);

const uploadUrl = resumableUpload.headers.location;

let offset = 0;
Expand Down

0 comments on commit 4b3ea81

Please sign in to comment.