diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/business.ts b/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/business.ts index 2aefb18fdd..a036da149d 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/business.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/business.ts @@ -1,5 +1,5 @@ import { - generateMetadata, + generateGoogleOAuthMetadata, generateProxyV0Payload, generateProxyV1Payload, } from '../../../testUtils'; @@ -90,7 +90,7 @@ const invalidArgumentRequestPayload = { ], }; -const metadataArray = [generateMetadata(1)]; +const metadataArray = [generateGoogleOAuthMetadata(1)]; const expectedStatTags = { destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', @@ -272,7 +272,7 @@ export const testScenariosForV1API = [ response: [ { error: '""', - metadata: generateMetadata(1), + metadata: generateGoogleOAuthMetadata(1), statusCode: 200, }, ], @@ -318,7 +318,7 @@ export const testScenariosForV1API = [ { error: 'Request contains an invalid argument. during ga_audience response transformation', - metadata: generateMetadata(1), + metadata: generateGoogleOAuthMetadata(1), statusCode: 400, }, ], @@ -363,7 +363,7 @@ export const testScenariosForV1API = [ response: [ { error: '""', - metadata: generateMetadata(1), + metadata: generateGoogleOAuthMetadata(1), statusCode: 200, }, ], diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/router/audience.ts b/test/integrations/destinations/google_adwords_remarketing_lists/router/audience.ts index 233f160ad3..e0b534bb15 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/router/audience.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/router/audience.ts @@ -1,5 +1,5 @@ import { Destination, RouterTransformationRequest } from '../../../../../src/types'; -import { generateMetadata } from '../../../testUtils'; +import { generateGoogleOAuthMetadata } from '../../../testUtils'; const destination: Destination = { Config: { @@ -30,7 +30,7 @@ const destination: Destination = { export const rETLAudienceRouterRequest: RouterTransformationRequest = { input: [ { - metadata: generateMetadata(1), + metadata: generateGoogleOAuthMetadata(1), destination: destination, message: { userId: 'user 1', @@ -57,7 +57,7 @@ export const rETLAudienceRouterRequest: RouterTransformationRequest = { }, }, { - metadata: generateMetadata(3), + metadata: generateGoogleOAuthMetadata(3), destination: destination, message: { userId: 'user 1', @@ -84,7 +84,7 @@ export const rETLAudienceRouterRequest: RouterTransformationRequest = { }, }, { - metadata: generateMetadata(4), + metadata: generateGoogleOAuthMetadata(4), destination: destination, message: { userId: 'user 1', diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/router/record.ts b/test/integrations/destinations/google_adwords_remarketing_lists/router/record.ts index 743213bcc1..bedf112866 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/router/record.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/router/record.ts @@ -1,5 +1,5 @@ import { Destination, RouterTransformationRequest } from '../../../../../src/types'; -import { generateMetadata } from '../../../testUtils'; +import { generateGoogleOAuthMetadata } from '../../../testUtils'; const destination: Destination = { Config: { @@ -51,7 +51,7 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { }, type: 'record', }, - metadata: generateMetadata(2), + metadata: generateGoogleOAuthMetadata(2), }, { destination: destination, @@ -75,7 +75,7 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { }, type: 'record', }, - metadata: generateMetadata(4), + metadata: generateGoogleOAuthMetadata(4), }, { destination: destination, @@ -99,7 +99,7 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { }, type: 'record', }, - metadata: generateMetadata(1), + metadata: generateGoogleOAuthMetadata(1), }, { destination: destination, @@ -123,7 +123,7 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { }, type: 'record', }, - metadata: generateMetadata(5), + metadata: generateGoogleOAuthMetadata(5), }, { destination: destination, @@ -147,7 +147,7 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { }, type: 'record', }, - metadata: generateMetadata(3), + metadata: generateGoogleOAuthMetadata(3), }, ], destType: 'google_adwords_remarketing_lists', diff --git a/test/integrations/testUtils.ts b/test/integrations/testUtils.ts index 833be04dec..5e0df874f8 100644 --- a/test/integrations/testUtils.ts +++ b/test/integrations/testUtils.ts @@ -573,6 +573,19 @@ export const generateMetadata = (jobId: number): any => { workspaceId: 'default-workspaceId', secret: { accessToken: 'default-accessToken', + }, + dontBatch: false, + }; +}; +export const generateGoogleOAuthMetadata = (jobId: number): any => { + return { + jobId, + attemptNum: 1, + userId: 'default-userId', + sourceId: 'default-sourceId', + destinationId: 'default-destinationId', + workspaceId: 'default-workspaceId', + secret: { access_token: 'default-accessToken', // applicable for google destinations }, dontBatch: false,