Skip to content

Commit

Permalink
chore: address commentsx2
Browse files Browse the repository at this point in the history
  • Loading branch information
yashasvibajpai committed Mar 1, 2024
1 parent 2401b55 commit 8a3fbf4
Showing 1 changed file with 27 additions and 44 deletions.
71 changes: 27 additions & 44 deletions test/integrations/destinations/salesforce/dataDelivery/other.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
import { ProxyV1TestData } from '../../../testTypes';
import { generateProxyV1Payload } from '../../../testUtils';

const statTags = {
errorCategory: 'network',
errorType: 'retryable',
destType: 'SALESFORCE',
module: 'destination',
implementation: 'native',
feature: 'dataDelivery',
destinationId: 'default-destinationId',
workspaceId: 'default-workspaceId',
};
const metadata = {
jobId: 1,
attemptNum: 1,
userId: 'default-userId',
destinationId: 'default-destinationId',
workspaceId: 'default-workspaceId',
sourceId: 'default-sourceId',
secret: {
accessToken: 'default-accessToken',
},
dontBatch: false,
};

export const otherSalesforceScenariosV1: ProxyV1TestData[] = [
{
id: 'salesforce_v1_other_scenario_1',
Expand Down Expand Up @@ -30,30 +53,10 @@ export const otherSalesforceScenariosV1: ProxyV1TestData[] = [
error:
'{"error":{"message":"Service Unavailable","description":"The server is currently unable to handle the request due to temporary overloading or maintenance of the server. Please try again later."}}',
statusCode: 500,
metadata: {
jobId: 1,
attemptNum: 1,
userId: 'default-userId',
destinationId: 'default-destinationId',
workspaceId: 'default-workspaceId',
sourceId: 'default-sourceId',
secret: {
accessToken: 'default-accessToken',
},
dontBatch: false,
},
metadata,
},
],
statTags: {
errorCategory: 'network',
errorType: 'retryable',
destType: 'SALESFORCE',
module: 'destination',
implementation: 'native',
feature: 'dataDelivery',
destinationId: 'default-destinationId',
workspaceId: 'default-workspaceId',
},
statTags,
message:
'Salesforce Request Failed - due to "{"error":{"message":"Service Unavailable","description":"The server is currently unable to handle the request due to temporary overloading or maintenance of the server. Please try again later."}}", (Retryable) during Salesforce Response Handling',
status: 500,
Expand Down Expand Up @@ -88,30 +91,10 @@ export const otherSalesforceScenariosV1: ProxyV1TestData[] = [
{
error: '"Internal Server Error"',
statusCode: 500,
metadata: {
jobId: 1,
attemptNum: 1,
userId: 'default-userId',
destinationId: 'default-destinationId',
workspaceId: 'default-workspaceId',
sourceId: 'default-sourceId',
secret: {
accessToken: 'default-accessToken',
},
dontBatch: false,
},
metadata,
},
],
statTags: {
errorCategory: 'network',
errorType: 'retryable',
destType: 'SALESFORCE',
module: 'destination',
implementation: 'native',
feature: 'dataDelivery',
destinationId: 'default-destinationId',
workspaceId: 'default-workspaceId',
},
statTags,
message:
'Salesforce Request Failed - due to ""Internal Server Error"", (Retryable) during Salesforce Response Handling',
status: 500,
Expand Down

0 comments on commit 8a3fbf4

Please sign in to comment.