Implement Datastream override feature + Unit tests + Integration tests#152
Implement Datastream override feature + Unit tests + Integration tests#152addb merged 10 commits intoadobe:datastreamOverridefrom
Conversation
…hed to the edge payload
code/main/edge/edgeRequestWorker.brs
Outdated
|
|
||
| _processRequest: function(eventData as object, ecid as string, configId as string, requestId as string, path as string, edgeDomain = invalid as dynamic) as object | ||
| requestBody = m._createEdgeRequestBody(eventData, ecid) | ||
| _processRequest: function(eventData as object, ecid as string, datastreamId as string, requestId as string, path as string, meta = {} as object, edgeDomain = invalid as dynamic) as object |
There was a problem hiding this comment.
I'm not familiar with the function's usage, but I prefer appending new default parameters to the end of the parameter list. Regarding "meta" do we require a default value considering we perform error checks within the function?
There was a problem hiding this comment.
Currently there are no other modules (media) passing meta to the edge request worker. I noticed worker.add() takes in a meta but we were not sending it. I went ahead and added it. But we can also remove passing the meta. from outside to edgeRequestWorker.
| end function | ||
|
|
||
| worker = _adb_EdgeRequestWorker() | ||
| networkResponse = worker._processRequest({ xdm: { key: "value" }, config: { key: "value"} }, "ecid_test", "config_id", "request_id", "/ee/v1/interact", invalid, invalid) |
There was a problem hiding this comment.
nit: Can you change config from
config: {
key: "value"
}
to
config: {
key1: "value1"
}
It is confusing when xdm and config has same key and value.
There was a problem hiding this comment.
Can you also add a test scenario where the data types for datastreamOverrideId and datastreamConfigOverride are not the types that are expected?
…nd configOverrides
Implement datastream override feature.
Expected implementation:
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: