Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mojaloop/#2880): simplify liquidity cover check and fix issue with validation (master) #85

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 151 additions & 129 deletions collections/hub/golden_path/feature_tests/block_transfer.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2,314 changes: 1,655 additions & 659 deletions collections/hub/golden_path/settlement_cgs/newsetcgs.json

Large diffs are not rendered by default.

1,089 changes: 0 additions & 1,089 deletions collections/hub/other_tests/bulk_transfers/bulk-duplicated-transfers.json

This file was deleted.

This file was deleted.

483 changes: 0 additions & 483 deletions collections/hub/other_tests/bulk_transfers/bulk-invalid-timestamp.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -687,4 +687,4 @@
]
}
]
}
}
51 changes: 12 additions & 39 deletions collections/hub/other_tests/bulk_transfers/negative_scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"exec": [
"var uuid = require('uuid');",
"",
"const delay = environment.EXPIRATION_DELAY_MS || 1000 * 3600 * 24",
"const delay = 1000 * 3600 * 24",
"const bulkTransferId = uuid.v4();",
"const bulkQuoteId = uuid.v4();",
"const transferId = uuid.v4();",
Expand Down Expand Up @@ -261,36 +261,6 @@
"errorCode": "5100",
"errorDescription": "An error occured"
}
},
"scriptingEngine": "javascript",
"tests": {
"assertions": [
{
"id": 1,
"description": "payerfsp callback - payer should be informed of payee abort",
"exec": [
"expect(environment.payerCallbackNotification.body).to.have.property(\"errorInformation\")",
"expect(JSON.stringify(environment.payerCallbackNotification.body.errorInformation)).to.equal(JSON.stringify(request.body.errorInformation))"
]
}
]
},
"scripts": {
"preRequest": {
"exec": [
"// Retrieve the payer fsp callback that is expected to be recieved after the payee fsp ",
"// sends a fulfil request",
"await inboundEvent.addListener('payer-callback', 'put', '/bulkTransfers/{$environment.bulkTransferId}/error')"
]
},
"postRequest": {
"exec": [
"environment.payerCallbackNotification = await inboundEvent.getMessage('payer-callback')",
"console.log(environment.payerCallbackNotification)",
"console.log(request.body.errorInformation)",
""
]
}
}
},
{
Expand Down Expand Up @@ -354,7 +324,7 @@
"id": 5,
"description": "payerfsp callback - fspiop-uri should be as expected",
"exec": [
"expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}`)"
"expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}/error`)"
]
},
{
Expand All @@ -366,17 +336,19 @@
},
{
"id": 8,
"description": "payerfsp callback - bulkTransfer should be REJECTED",
"description": "payerfsp callback - errorInformation should be set correctly",
"exec": [
"expect(callback.body).to.have.property(\"bulkTransferState\")",
"expect(callback.body.bulkTransferState).to.equal(\"REJECTED\")"
"expect(callback.body).to.have.property(\"errorInformation\")",
"expect(JSON.stringify(callback.body.errorInformation)).to.equal(JSON.stringify({",
" errorCode: \"5100\",",
" errorDescription: \"An error occured\"",
"}))"
]
}
]
},
"ignoreCallbacks": false,
"scriptingEngine": "javascript",
"delay": "1000",
"scripts": {
"postRequest": {
"exec": [
Expand All @@ -388,7 +360,8 @@
""
]
}
}
},
"delay": "1000"
},
{
"id": 7,
Expand Down Expand Up @@ -800,7 +773,7 @@
"scripts": {
"preRequest": {
"exec": [
"const delay = environment.EXPIRATION_DELAY_MS || 1000 * 3600 * 24",
"const delay = 1000 * 3600 * 24",
"const now = new Date()",
"const expirationDate = new Date(now.getTime() + delay).toISOString();",
"const completedTimestamp = now.toISOString();",
Expand Down Expand Up @@ -1092,4 +1065,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -657,4 +657,4 @@
]
}
]
}
}