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

Rename collection to reflect 2.0 and also changes to expected return strings for GCP

parent bc875a2b
Pipeline #57691 passed with stages
in 4 minutes
{
"info": {
"_postman_id": "3f70d0f3-f9bd-467a-9061-3a6d1468fcbb",
"_postman_id": "7b5d2e82-41e0-4979-8496-01c0ca82e601",
"name": "Entitlement API CI/CD v2.0",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
......@@ -1473,13 +1473,15 @@
" if (resBody != null) {",
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\")",
" pm.expect(resBody.name).to.be.oneOf([\"Unauthorized\"])",
" if (cp == \"GCP\") {",
" pm.expect(pm.response.status).to.be.oneOf([\"Unauthorized\"]);",
" }",
" else if(cp == \"Azure\"){",
" pm.expect(pm.response.status).to.be.oneOf([\"Forbidden\"]);",
" }",
" else",
" pm.expect(resBody.message).to.be.oneOf([\"not authorized\",\"Unauthorized\",\"The user is not authorized to perform this action\",\"Access denied\"])",
" else {",
" pm.expect(resBody.message).to.be.oneOf([\"not authorized\",\"Unauthorized\",\"The user is not authorized to perform this action\",\"Access denied\",\"Partition does not exist.\"])",
" }",
" });",
" }",
"}",
......@@ -1622,7 +1624,7 @@
" let resBody = pm.response.json();",
" if (resBody != null) {",
" pm.test(\"Response has not authorized string\", function () {",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"not authorized\",\"The user is not authorized to perform this function\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"])",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"not authorized\",\"The user is not authorized to perform this function\", \"Not valid token provided\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"])",
" });",
" }",
"}",
......@@ -1692,7 +1694,7 @@
" let resBody = pm.response.json();",
" if (resBody != null) {",
" pm.test(\"Response has not authorized string\", function () {",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"not authorized\",\"The user is not authorized to perform this function\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"])",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"not authorized\",\"The user is not authorized to perform this function\", \"Not valid token provided\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"])",
" });",
" }",
"}",
......@@ -1838,11 +1840,14 @@
"});",
"",
"pm.test(\"More then 0 groups returned\", function () {",
" ",
" var jsonData = pm.response.json();",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"AWS\") {",
" pm.expect(Object.keys(jsonData).length).to.not.equal(0);",
" }else{",
" pm.expect(Object.keys(jsonData.groups).length).to.not.equal(0);",
" ",
" pm.expect(Object.keys(jsonData.groups).length).to.not.equal(0);",
" }",
" ",
"});"
......@@ -2001,7 +2006,7 @@
" let resBody = pm.response.json();",
" if (resBody != null) {",
" pm.test(\"Response has not authorized string\", function () {",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"not authorized\",\"The user is not authorized to perform this function\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"]);",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"not authorized\",\"The user is not authorized to perform this function\",\"Not valid token provided\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"]);",
" });",
" }",
"}",
......@@ -2066,7 +2071,7 @@
" let resBody = pm.response.json();",
" if (resBody != null) {",
" pm.test(\"Response has not authorized string\", function () {",
" pm.expect(resBody.message).to.be.oneOf([\"not authorized\",\"The user is not authorized to perform this function\",\"Unauthorized\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"]);",
" pm.expect(resBody.message).to.be.oneOf([\"not authorized\",\"The user is not authorized to perform this function\",\"Unauthorized\",\"Not valid token provided\", \"401 Unauthorized: {\\n \\\"error\\\": \\\"invalid_request\\\",\\n \\\"error_description\\\": \\\"Invalid Credentials\\\"\\n}\"]);",
" });",
" }",
"}",
......@@ -5397,12 +5402,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" //pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" if (cp == \"GCP\"){",
" pm.expect(resBody.name).to.include.oneOf([\"Unauthorized\",\"Bad Request\"]);",
" }",
" else{",
" pm.expect(resBody.reason).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\",\"Access denied\"]);",
" }",
" pm.expect(resBody.reason).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\",\"Access denied\", \"Partition get partition error\"]);",
" });",
" }",
"}",
......@@ -5574,8 +5574,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\"){",
" pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" pm.expect(pm.response.text()).to.include(\"Invalid Credentials\");",
" pm.expect(pm.response.text()).to.include(\"Not valid token provided\");",
" }",
" else{",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\"]);",
......@@ -5671,8 +5670,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\"){",
" pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" pm.expect(pm.response.text()).to.include(\"Invalid Credentials\");",
" pm.expect(pm.response.text()).to.include(\"Not valid token provided\");",
" }",
" else{",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\"]);",
......@@ -5873,7 +5871,7 @@
}
],
"url": {
"raw": "https://{{ENTITLEMENTS_HOST}}/groups/:group_email/members?cursor&limit&role",
"raw": "https://{{ENTITLEMENTS_HOST}}/groups/:group_email/members?cursor=&limit=&role=",
"protocol": "https",
"host": [
"{{ENTITLEMENTS_HOST}}"
......@@ -5924,7 +5922,7 @@
" //pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\"){",
" pm.expect(resBody.name).to.include.oneOf([\"Unauthorized\",\"Bad Request\"]);",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"Partition does not exist\"]);",
" }",
" else{",
" pm.expect(resBody.reason).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\",\"Error creating creating Cosmos Client\",\"Access denied\"]);",
......@@ -6088,8 +6086,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\"){",
" pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" pm.expect(pm.response.text()).to.include(\"Invalid Credentials\");",
" pm.expect(pm.response.text()).to.include(\"Not valid token provided\");",
" }",
" else{",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\"]);",
......@@ -6179,8 +6176,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\"){",
" pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" pm.expect(pm.response.text()).to.include(\"Invalid Credentials\");",
" pm.expect(pm.response.text()).to.include(\"Not valid token provided\");",
" }",
" else{",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\"]);",
......@@ -6354,7 +6350,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" //pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" if (cp == \"GCP\") {",
" pm.expect(resBody.name).to.include.oneOf([\"Unauthorized\",\"Bad Request\"]);",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"Partition does not exist\"]);",
" }",
" else{",
" pm.expect(resBody.reason).to.include.oneOf([\"The user is not authorized to perform this function\",\"Unauthorized\",\"Error creating creating Cosmos Client\",\"Access denied\"]);",
......@@ -6492,8 +6488,7 @@
" if (resBody != null) {",
" pm.test(\"Response has not authorized string\", function () {",
" if (cp == \"GCP\") { ",
" pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" pm.expect(pm.response.text()).to.include(\"Invalid Credentials\");",
" pm.expect(pm.response.text()).to.include(\"ot valid token provided\");",
" }",
" else{",
" pm.expect(resBody.message).to.be.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\"]);",
......@@ -6573,8 +6568,7 @@
" pm.test(\"Response has not authorized string\", function () {",
" cp = pm.variables.get(\"cloud_platform\");",
" if (cp == \"GCP\"){",
" pm.expect(pm.response.text()).to.include(\"Unauthorized\");",
" pm.expect(pm.response.text()).to.include(\"Invalid Credentials\");",
" pm.expect(pm.response.text()).to.include(\"Not valid token provided\");",
" }",
" else{",
" pm.expect(resBody.message).to.include.oneOf([\"Unauthorized\",\"The user is not authorized to perform this function\"]);",
......
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