Skip to content

Commit

Permalink
chore: test case fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed May 3, 2024
1 parent d6e5147 commit c26cb0f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 140 deletions.
1 change: 0 additions & 1 deletion src/v1/destinations/campaign_manager/networkHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const responseHandler = (responseParams, logger) => {
return {
status,
message,
destinationResponse,
response: responseWithIndividualEvents,
};
}
Expand Down
152 changes: 13 additions & 139 deletions test/integrations/destinations/campaign_manager/dataDelivery/business.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,49 +219,49 @@ export const testScenariosForV0API = [
destinationResponse: {
response: {
hasFailures: true,
kind: 'dfareporting#conversionsBatchInsertResponse',
status: [
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
childDirectedTreatment: true,
floodlightActivityId: '456543345245',
value: 7,
floodlightConfigurationId: '213123123',
gclid: '123',
limitAdTracking: true,
childDirectedTreatment: true,
ordinal: '1',
timestampMicros: '1668624722000000',
value: 7,
},
errors: [
{
code: 'INVALID_ARGUMENT',
message: 'Gclid is not valid.',
kind: 'dfareporting#conversionError',
message: 'Gclid is not valid.',
},
],
kind: 'dfareporting#conversionStatus',
},
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
childDirectedTreatment: true,
floodlightActivityId: '456543345245',
value: 8,
floodlightConfigurationId: '213123123',
gclid: '321',
limitAdTracking: true,
childDirectedTreatment: true,
ordinal: '1',
timestampMicros: '1668624722000000',
value: 8,
},
errors: [
{
code: 'NOT_FOUND',
message: 'Floodlight config id: 213123123 was not found.',
kind: 'dfareporting#conversionError',
message: 'Floodlight config id: 213123123 was not found.',
},
],
kind: 'dfareporting#conversionStatus',
},
],
kind: 'dfareporting#conversionsBatchInsertResponse',
},
status: 200,
},
Expand Down Expand Up @@ -312,41 +312,6 @@ export const testScenariosForV1API: ProxyV1TestData[] = [
output: {
status: 200,
message: '[CAMPAIGN_MANAGER Response V1 Handler] - Request Processed Successfully',
destinationResponse: {
response: {
hasFailures: false,
status: [
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
floodlightActivityId: '456543345245',
value: 7,
gclid: '123',
limitAdTracking: true,
childDirectedTreatment: true,
},
kind: 'dfareporting#conversionStatus',
},
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
floodlightActivityId: '456543345245',
value: 8,
gclid: '321',
limitAdTracking: true,
childDirectedTreatment: true,
},
kind: 'dfareporting#conversionStatus',
},
],
kind: 'dfareporting#conversionsBatchInsertResponse',
},
status: 200,
},
response: [
{
statusCode: 200,
Expand Down Expand Up @@ -412,48 +377,6 @@ export const testScenariosForV1API: ProxyV1TestData[] = [
output: {
status: 200,
message: '[CAMPAIGN_MANAGER Response V1 Handler] - Request Processed Successfully',
destinationResponse: {
response: {
hasFailures: true,
status: [
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
floodlightActivityId: '456543345245',
value: 7,
gclid: '123',
limitAdTracking: true,
childDirectedTreatment: true,
},
kind: 'dfareporting#conversionStatus',
},
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
floodlightActivityId: '456543345245',
value: 8,
gclid: '321',
limitAdTracking: true,
childDirectedTreatment: true,
},
errors: [
{
code: 'NOT_FOUND',
message: 'Floodlight config id: 213123123 was not found.',
kind: 'dfareporting#conversionError',
},
],
kind: 'dfareporting#conversionStatus',
},
],
kind: 'dfareporting#conversionsBatchInsertResponse',
},
status: 200,
},
response: [
{
statusCode: 200,
Expand Down Expand Up @@ -519,55 +442,6 @@ export const testScenariosForV1API: ProxyV1TestData[] = [
output: {
status: 200,
message: '[CAMPAIGN_MANAGER Response V1 Handler] - Request Processed Successfully',
destinationResponse: {
response: {
hasFailures: true,
status: [
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
floodlightActivityId: '456543345245',
value: 7,
gclid: '123',
limitAdTracking: true,
childDirectedTreatment: true,
},
errors: [
{
code: 'INVALID_ARGUMENT',
message: 'Gclid is not valid.',
kind: 'dfareporting#conversionError',
},
],
kind: 'dfareporting#conversionStatus',
},
{
conversion: {
timestampMicros: '1668624722000000',
floodlightConfigurationId: '213123123',
ordinal: '1',
floodlightActivityId: '456543345245',
value: 8,
gclid: '321',
limitAdTracking: true,
childDirectedTreatment: true,
},
errors: [
{
code: 'NOT_FOUND',
message: 'Floodlight config id: 213123123 was not found.',
kind: 'dfareporting#conversionError',
},
],
kind: 'dfareporting#conversionStatus',
},
],
kind: 'dfareporting#conversionsBatchInsertResponse',
},
status: 200,
},
response: [
{
statusCode: 400,
Expand Down

0 comments on commit c26cb0f

Please sign in to comment.