Skip to content

Commit

Permalink
fix(mojaloop/#2719): post quotes fails when transactionId does not eq…
Browse files Browse the repository at this point in the history
…ual transactionrequestId (#68)

fix(mojaloop/#2719): post quotes fails when transactionId does not equal transactionRequestId - mojaloop/project#2719
- Added random UUID generated transactionRequestId to the Post Quotes requests in the P2P Happy Path test-case collection
  • Loading branch information
mdebarros authored Mar 14, 2022
1 parent 8fa7cca commit 701863b
Showing 1 changed file with 43 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"meta": {
"info": "This is a happy path to test an end to end transfers. It includes party lookup, quote and transfer phases."
},
"fileInfo": {
"path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json",
"labels": [
"p2p"
]
},
"requests": [
{
"id": 1,
Expand Down Expand Up @@ -178,6 +184,7 @@
},
"url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}",
"path": "/parties/{$inputs.toIdType}/{$inputs.toIdValue}",
"scriptingEngine": "javascript",
"scripts": {
"preRequest": {
"exec": [
Expand All @@ -193,8 +200,7 @@
"}"
]
}
},
"scriptingEngine": "javascript"
}
},
{
"id": 4,
Expand All @@ -221,6 +227,7 @@
"body": {
"quoteId": "{$function.generic.generateUUID}",
"transactionId": "{$function.generic.generateUUID}",
"transactionRequestId": "{$function.generic.generateUUID}",
"payer": {
"partyIdInfo": {
"partyIdType": "{$inputs.fromIdType}",
Expand Down Expand Up @@ -255,22 +262,6 @@
"note": "{$inputs.note}"
},
"scriptingEngine": "javascript",
"scripts": {
"preRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')",
"}"
]
},
"postRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)",
"}"
]
}
},
"tests": {
"assertions": [
{
Expand Down Expand Up @@ -394,7 +385,23 @@
"ID": "{$inputs.toIdValue}"
},
"path": "/quotes",
"url": "{$inputs.HOST_QUOTING_SERVICE}"
"url": "{$inputs.HOST_QUOTING_SERVICE}",
"scripts": {
"preRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.quoteId}', 'payeeRequest')",
"}"
]
},
"postRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)",
"}"
]
}
}
},
{
"id": 5,
Expand Down Expand Up @@ -430,22 +437,6 @@
"condition": "{$prev.4.callback.body.condition}"
},
"scriptingEngine": "javascript",
"scripts": {
"preRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.transferId}', 'payeeRequest')",
"}"
]
},
"postRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)",
"}"
]
}
},
"tests": {
"assertions": [
{
Expand Down Expand Up @@ -550,7 +541,23 @@
}
]
},
"url": "{$inputs.HOST_ML_API_ADAPTER}"
"url": "{$inputs.HOST_ML_API_ADAPTER}",
"scripts": {
"preRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/requests/{$request.body.transferId}', 'payeeRequest')",
"}"
]
},
"postRequest": {
"exec": [
"if (environment.ENABLE_WS_ASSERTIONS===true) {",
" environment.payeeRequest = await websocket.getMessage('payeeRequest', environment.WS_ASSERTION_TIMEOUT)",
"}"
]
}
}
}
]
}
Expand Down

0 comments on commit 701863b

Please sign in to comment.