Commit ae582a10 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

do not test response body on non-numeric Content-Length header

parent bfc5cd8a
......@@ -292,20 +292,7 @@
"pm.test(pm.variables.get(\"test_prefix\") + \"Bad Request\", function () {",
" pm.expect(pm.response.code).to.eql(400);",
"});",
"",
"",
"pm.test(pm.variables.get(\"test_prefix\") + \"Valid error response body\", function() {",
" pm.response.to.be.withBody;",
" pm.response.to.be.json;",
"",
" var Ajv = require('ajv');",
" ajv = new Ajv();",
" const validate = ajv.compile(JSON.parse(pm.variables.get(\"response-schema:error\")));",
"",
" const jsonData = pm.response.json();",
" pm.expect(validate(jsonData)).to.be.true;",
" pm.expect(jsonData.code).to.eql(400);",
"});"
""
],
"type": "text/javascript"
}
......@@ -332,7 +319,8 @@
"path": [
"{{endpoint}}"
]
}
},
"description": "Non-numeric Content-Length headers are a corner case. The returned error page will be HTML. See [issue #62](https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/62) why we will not fix this."
},
"response": []
}
......@@ -384,14 +372,6 @@
{
"key": "response-schema:error",
"value": ""
},
{
"key": "endpoint",
"value": "bg/clear"
},
{
"key": "method",
"value": "POST"
}
]
}
\ No newline at end of file
......@@ -350,19 +350,7 @@
"pm.test(pm.variables.get(\"test_prefix\") + \"Bad Request\", function () {",
" pm.expect(pm.response.code).to.eql(400);",
"});",
"",
"pm.test(pm.variables.get(\"test_prefix\") + \"Valid error response body\", function() {",
" pm.response.to.be.withBody;",
" pm.response.to.be.json;",
"",
" var Ajv = require('ajv');",
" ajv = new Ajv();",
" const validate = ajv.compile(JSON.parse(pm.variables.get(\"response-schema:error\")));",
"",
" const jsonData = pm.response.json();",
" pm.expect(validate(jsonData)).to.be.true;",
" pm.expect(jsonData.code).to.eql(400);",
"});"
""
],
"type": "text/javascript"
}
......@@ -400,7 +388,8 @@
"path": [
"{{endpoint}}"
]
}
},
"description": "Non-numeric Content-Length headers are a corner case. The returned error page will be HTML. See [issue #62](https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/issues/62) why we will not fix this."
},
"response": []
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment