Skip to content

Commit

Permalink
feat: add check for a non-empty body in Get cached EDRs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikschul committed Oct 9, 2024
1 parent 047e9cb commit 934e90a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions deployment/postman/MVD.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,25 @@
{
"name": "Get cached EDRs",
"event": [
{
"listen": "test",
"script": {
"exec": [
"response = pm.response.json();",
"pm.test('Body is not empty', () =>{",
" pm.expect(response.length).to.be.greaterThan(0);",
"})",
"",
"// get the transfer process id of \"asset-1\" and save it as an environment variable if the response body is not empty",
"if(pm.response.code < 300 && pm.response.code >= 200 && response.length > 0){",
" const transferProcessId = pm.response.json()[0][\"transferProcessId\"];",
" pm.environment.set(\"TRANSFER_PROCESS_ID\", transferProcessId);",
"}"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
Expand Down

0 comments on commit 934e90a

Please sign in to comment.