-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixing network handler for catalog
- Loading branch information
1 parent
d6a9059
commit 333fa07
Showing
3 changed files
with
123 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { ProxyV1TestData } from '../../../testTypes'; | ||
import { generateProxyV1Payload, generateMetadata } from '../../../testUtils'; | ||
import { destType, headers, properties, endpoint } from '../common'; | ||
import { destType, headers, properties, endpoint, updateEndpoint } from '../common'; | ||
|
||
const customerProperties = { | ||
email: '[email protected]', | ||
|
@@ -192,4 +192,69 @@ export const businessProxyV1: ProxyV1TestData[] = [ | |
}, | ||
}, | ||
}, | ||
{ | ||
id: 'bloomreach_v1_business_scenario_3', | ||
name: destType, | ||
description: | ||
'[Proxy v1 API] :: Test for a valid rETL request - where the destination responds with 200 with error', | ||
successCriteria: 'Should return 400 with error message', | ||
scenario: 'Business', | ||
feature: 'dataDelivery', | ||
module: 'destination', | ||
version: 'v1', | ||
input: { | ||
request: { | ||
body: generateProxyV1Payload( | ||
{ | ||
headers, | ||
params: {}, | ||
JSON: {}, | ||
JSON_ARRAY: { | ||
batch: [ | ||
{ | ||
item_id: 'test-item-id-faulty', | ||
properties: { | ||
unprinted1: '1', | ||
}, | ||
}, | ||
], | ||
}, | ||
endpoint: updateEndpoint, | ||
}, | ||
[generateMetadata(3)], | ||
), | ||
method: 'POST', | ||
}, | ||
}, | ||
output: { | ||
response: { | ||
status: 200, | ||
body: { | ||
output: { | ||
status: 200, | ||
message: '[BLOOMREACH Response V1 Handler] - Request Processed Successfully', | ||
destinationResponse: { | ||
response: [ | ||
{ | ||
success: false, | ||
queued: false, | ||
errors: { | ||
properties: ['Fields [unprinted1] are not properly defined.'], | ||
}, | ||
}, | ||
], | ||
status: 200, | ||
}, | ||
response: [ | ||
{ | ||
statusCode: 400, | ||
metadata: generateMetadata(3), | ||
error: 'Fields [unprinted1] are not properly defined.', | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters