Skip to content

Commit

Permalink
test: fix generic proxy test suite failures (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Dec 13, 2022
1 parent e747d5a commit f3f1867
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
6 changes: 4 additions & 2 deletions src/versionedRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -993,13 +993,15 @@ async function handleProxyRequest(destination, ctx) {
[tags.TAG_NAMES.DEST_TYPE]: destination.toUpperCase(),
[tags.TAG_NAMES.MODULE]: tags.MODULES.DESTINATION,
[tags.TAG_NAMES.IMPLEMENTATION]: tags.IMPLEMENTATIONS.NATIVE,
[tags.TAG_NAMES.FEATURE]: tags.FEATURES.DATA_DELIVERY,
[tags.TAG_NAMES.FEATURE]: tags.FEATURES.DATA_DELIVERY
// [tags.TAG_NAMES.DESTINATION_ID]: TBD
});

response = {
status: errObj.status,
authErrorCategory: errObj.authErrorCategory,
...(errObj.authErrCategory && {
authErrCategory: errObj.authErrorCategory
}),
destinationResponse: errObj.destinationResponse,
message: errObj.message,
statTags: errObj.statTags
Expand Down
45 changes: 25 additions & 20 deletions test/__tests__/data/proxy_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
},
"statTags": {
"destType": "ANY",
"stage": "responseTransform",
"scope": "api",
"meta": "abortable",
"errorAt": "proxy"
"errorCategory": "network",
"errorType": "aborted",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
},
Expand All @@ -46,10 +47,11 @@
},
"statTags": {
"destType": "ANY",
"stage": "responseTransform",
"scope": "api",
"meta": "abortable",
"errorAt": "proxy"
"errorCategory": "network",
"errorType": "aborted",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
},
Expand All @@ -63,10 +65,11 @@
},
"statTags": {
"destType": "ANY",
"stage": "responseTransform",
"scope": "api",
"meta": "abortable",
"errorAt": "proxy"
"errorCategory": "network",
"errorType": "aborted",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
},
Expand All @@ -80,10 +83,11 @@
},
"statTags": {
"destType": "ANY",
"stage": "responseTransform",
"scope": "api",
"meta": "retryable",
"errorAt": "proxy"
"errorCategory": "network",
"errorType": "retryable",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
},
Expand All @@ -97,10 +101,11 @@
},
"statTags": {
"destType": "ANY",
"stage": "responseTransform",
"scope": "api",
"meta": "retryable",
"errorAt": "proxy"
"errorCategory": "network",
"errorType": "retryable",
"feature": "dataDelivery",
"implementation": "native",
"module": "destination"
}
}
}
Expand Down

0 comments on commit f3f1867

Please sign in to comment.