Commit 7aa91f1d authored by Kamlesh Todai's avatar Kamlesh Todai
Browse files

Fix Request #14 to allow for 401 or 403 as the code in storage API collection...

Fix Request #14 to allow for 401 or 403 as the code in storage API collection 401 for GCP and IBM and 403 for AWS and Azure
parent fd5aa0ed
Pipeline #12647 failed with stages
in 9 seconds
......@@ -1447,9 +1447,8 @@
" let resBody = pm.response.json();",
" if (resBody != null) {",
" mesg = resBody.message;",
" console.log(\"Message: \" + mesg);",
" pm.test(\"Response has Invalid group string\", function () {",
" pm.expect(pm.response.text()).to.include(\"Invalid group\");",
" pm.expect(mesg.search(\"Invalid group\"));",
" });",
" }",
"}",
......@@ -1511,12 +1510,23 @@
"script": {
"id": "b384f80c-e05d-498b-8951-0ad5c22c0dcc",
"exec": [
"pm.test(\"Status code is 403\", function () {",
" pm.response.to.have.status(403);",
"pm.test(\"Status code is 401 or 403\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([401, 403]);",
"});",
"/*pm.test(\"Status description - User not authorized to perform the action.\", function () {",
" pm.response.to.have.status(\"User not authorized to perform the action.\");",
"});*/",
"try {",
" let resBody = pm.response.json();",
" if (resBody != null) {",
" mesg = resBody.message;",
" console.log(\"Message: \" + mesg);",
" pm.test(\"Response has Invalid group string\", function () {",
" pm.expect(mesg.search(\"user is not authorized\"));",
" });",
" }",
"}",
"catch (e) {",
" console.log(e.message);",
"}",
"",
""
],
"type": "text/javascript"
......
Markdown is supported
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