Skip to content

Commit

Permalink
feat(mbp/#286): add simulator rule to trigger patch transferState=abo…
Browse files Browse the repository at this point in the history
…rted notification (#138)

* Update rules.json

* Update package.json

* mbp-286 Add fulfilment, transferState and completedTimestamp to Swagger

* Update rules.json

* Update rules.json

* Update rules.json

* Update Dockerfile

* Update config.yml

* Update config.yml

* Update Dockerfile

* mbp286 update rule

* Update audit-resolve.json

* Update rules.json

* Update package.json

* Update api.yaml

* Update rules.json

* Update api.yaml
  • Loading branch information
gibaros committed May 17, 2022
1 parent 22e4f33 commit d4a407a
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 2 deletions.
170 changes: 169 additions & 1 deletion src/audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,176 @@
"decision": "ignore",
"madeAt": 1647583534833,
"expiresAt": 1650175516992
},
"1070277|sqlite3": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070363|sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070363|sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070366|sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070366|sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070369|sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070369|sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070372|sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070373|sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070376|sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1070377|sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793816820
},
"1067342|sqlite3>node-gyp>mkdirp>minimist": {
"decision": "postpone",
"madeAt": 1652793819010
},
"1067342|sqlite3>node-gyp>fstream>mkdirp>minimist": {
"decision": "postpone",
"madeAt": 1652793819010
},
"1067342|00unidentified>sqlite3>node-gyp>fstream>mkdirp>minimist": {
"decision": "postpone",
"madeAt": 1652793819010
},
"1067342|00unidentified>00unidentified>sqlite3>node-gyp>fstream>mkdirp>minimist": {
"decision": "postpone",
"madeAt": 1652793819010
},
"1067342|00unidentified>00unidentified>sqlite3>node-gyp>tar>fstream>mkdirp>minimist": {
"decision": "postpone",
"madeAt": 1652793819010
},
"1067524|sqlite3>node-gyp>request>http-signature>jsprim>json-schema": {
"decision": "postpone",
"madeAt": 1652793820635
},
"1067524|00unidentified>sqlite3>node-gyp>request>http-signature>jsprim>json-schema": {
"decision": "postpone",
"madeAt": 1652793820635
},
"1067524|00unidentified>00unidentified>sqlite3>node-gyp>request>http-signature>jsprim>json-schema": {
"decision": "postpone",
"madeAt": 1652793820635
},
"1070022|node-fetch": {
"decision": "postpone",
"madeAt": 1652793822418
},
"1070277|00unidentified>sqlite3": {
"decision": "postpone",
"madeAt": 1652793823995
},
"1070277|00unidentified>00unidentified>sqlite3": {
"decision": "postpone",
"madeAt": 1652793823995
},
"1070363|00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070363|00unidentified>00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070363|00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070363|00unidentified>00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070366|00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070366|00unidentified>00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070366|00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070366|00unidentified>00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070369|00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070369|00unidentified>00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070369|00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070369|00unidentified>00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070372|00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070372|00unidentified>00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070373|00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825481
},
"1070373|00unidentified>00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825482
},
"1070376|00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825482
},
"1070376|00unidentified>00unidentified>sqlite3>node-pre-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825482
},
"1070377|00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825482
},
"1070377|00unidentified>00unidentified>sqlite3>node-gyp>tar": {
"decision": "postpone",
"madeAt": 1652793825482
}
},
"rules": {},
"version": 1
}
}
36 changes: 35 additions & 1 deletion src/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,39 @@
}
}
}
},
{
"ruleId": 5,
"description": "Returns an invalid fulfillment from the simulator when transfer value is 123123123123123 in any currency",
"conditions": {
"all": [
{
"fact": "path",
"operator": "equal",
"value": "/transfers"
},
{
"fact": "method",
"operator": "equal",
"value": "POST"
},
{
"fact": "body",
"operator": "equal",
"value": "123123123123123",
"path": "$.amount"
}
]
},
"event": {
"type": "simulateResponse",
"params": {
"statusCode": 200,
"body": {
"homeTransactionId": "274107e7-cac7-427b-8485-065c919db2e6",
"fulfilment": "Lw8ygZt5_ZxQ9uPDoT0pSezu7Jyj_CNtmvFFZMgJHo5"
}
}
}
}
]
]
12 changes: 12 additions & 0 deletions src/simulator/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,18 @@ components:
homeTransactionId:
type: string
description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems
example: "274107e7-cac7-427b-8485-065c919db2e6"
fulfilment:
$ref: '#/components/schemas/IlpFulfilment'
description: Fulfilment from the DFSP backend, used for testing purposes to inject an invalid fulfilment via a rule.
transferState:
$ref: '#/components/schemas/transferState'
description: Transfer state from the DFSP backend, used for testing purposes to inject an desired transfer state via a rule.
example: ABORTED
completedTimestamp:
$ref: '#/components/schemas/timestamp'
description: Completed timestamp from the DFSP backend, used for testing purposes to inject a given completed timestamp via a rule.
example: "2020-05-19T08:38:08.699-04:00"

currency:
maxLength: 3
Expand Down

0 comments on commit d4a407a

Please sign in to comment.