From 092a495a4c3c0597066c980ff2fb9237a6f2b00b Mon Sep 17 00:00:00 2001 From: Hafeez Date: Sun, 22 Apr 2018 21:11:47 +0100 Subject: added to postman collection for testing --- test/postman.json | 408 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 397 insertions(+), 11 deletions(-) (limited to 'test/postman.json') diff --git a/test/postman.json b/test/postman.json index 6d8541b..1559ea1 100644 --- a/test/postman.json +++ b/test/postman.json @@ -2,7 +2,7 @@ "variables": [], "info": { "name": "JH", - "_postman_id": "d9fad1ce-92af-fc2c-ff74-074fc681c7ee", + "_postman_id": "c78e805a-429f-8ed8-f523-6bfab655c397", "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, @@ -80,7 +80,8 @@ "key": "userfile", "description": "", "type": "file", - "src": "checker_black.jpg" + "src": "checker_black.jpg", + "value": "" } ] }, @@ -179,7 +180,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -191,9 +195,9 @@ "method": "GET", "header": [ { - "key": "", - "value": "", - "disabled": true + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" } ], "body": { @@ -217,7 +221,10 @@ "disabled": true } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -235,7 +242,10 @@ "disabled": true } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -252,7 +262,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -296,7 +309,10 @@ "url": "{{host}}/", "method": "GET", "header": [], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -313,7 +329,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -342,6 +361,373 @@ "description": "" }, "response": [] + }, + { + "name": "/log", + "request": { + "url": "{{host}}/{{endpoint}}/log", + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type`", + "value": "application/json", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "[{\n\t\"component\": \"anything\",\n\t\"level\": \"info\",\n\t\"value\": \"1000\"\n}]" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/properties", + "request": { + "url": { + "raw": "{{host}}/{{endpoint}}/properties?action=update", + "host": [ + "{{host}}" + ], + "path": [ + "{{endpoint}}", + "properties" + ], + "query": [ + { + "key": "action", + "value": "update", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "[{\n\t\"id\": \"project_example\",\n\t\"value\": 10\n}]" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/user_privileges", + "request": { + "url": "{{host}}/{{endpoint}}/user_privileges", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + }, + { + "name": "/users", + "request": { + "url": "{{host}}/{{endpoint}}/users", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + }, + { + "name": "/users/:username", + "request": { + "url": "{{host}}/{{endpoint}}/users/{{dummy_admin_username}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + }, + { + "name": "/users/:username?action=create", + "request": { + "url": { + "raw": "{{host}}/{{endpoint}}/users/{{new_username}}?action=create", + "host": [ + "{{host}}" + ], + "path": [ + "{{endpoint}}", + "users", + "{{new_username}}" + ], + "query": [ + { + "key": "action", + "value": "create", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"privileges\": [],\n\t\"password\": \"newPass\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/users/:username?action=update", + "request": { + "url": { + "raw": "{{host}}/{{endpoint}}/users/{{new_username}}?action=update", + "host": [ + "{{host}}" + ], + "path": [ + "{{endpoint}}", + "users", + "{{new_username}}" + ], + "query": [ + { + "key": "action", + "value": "update", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"password\": \"newPass2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/users/:username?action=delete", + "request": { + "url": { + "raw": "{{host}}/{{endpoint}}/users/{{new_username}}?action=delete", + "host": [ + "{{host}}" + ], + "path": [ + "{{endpoint}}", + "users", + "{{new_username}}" + ], + "query": [ + { + "key": "action", + "value": "delete", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/users/:username/properties", + "request": { + "url": "{{host}}/{{endpoint}}/users/{{new_username}}/properties", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/current_user", + "request": { + "url": "{{host}}/{{endpoint}}/current_user", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/current_user", + "request": { + "url": "{{host}}/{{endpoint}}/current_user", + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"password\": {\n\t\t\"old\": \"pass\",\n\t\t\"new\": \"pass2\"\n\t}\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/projects/:project_name", + "request": { + "url": "{{host}}/{{endpoint}}/projects/{{dummy_project}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + }, + { + "name": "/projects/:project_name/properties", + "request": { + "url": "{{host}}/{{endpoint}}/projects/{{dummy_project}}/properties", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{access_token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] } ] }, -- cgit v1.2.1 From 09d8eefb5e07d50606cd916f6180b6a5c53927a4 Mon Sep 17 00:00:00 2001 From: jw255 Date: Mon, 23 Apr 2018 14:00:56 +0100 Subject: changed postman tests to fit current file-model --- test/postman.json | 81 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 23 deletions(-) (limited to 'test/postman.json') diff --git a/test/postman.json b/test/postman.json index 1559ea1..6c33ee2 100644 --- a/test/postman.json +++ b/test/postman.json @@ -1,8 +1,8 @@ { "variables": [], "info": { - "name": "JH", - "_postman_id": "c78e805a-429f-8ed8-f523-6bfab655c397", + "name": "JH-Tests", + "_postman_id": "026d9590-14ae-08df-9cc1-7a592aebdf02", "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, @@ -15,14 +15,14 @@ "name": "/projects/", "request": { "url": { - "raw": "{{host}}/{{endpoint}}/projects/other?action=create", + "raw": "{{host}}/{{endpoint}}/projects/{{dummy_project}}?action=create", "host": [ "{{host}}" ], "path": [ "{{endpoint}}", "projects", - "other" + "{{dummy_project}}" ], "query": [ { @@ -58,7 +58,34 @@ { "name": "/projects/abc/files", "request": { - "url": "{{host}}/{{endpoint}}/projects/{{dummy_project}}/files/file", + "url": { + "raw": "{{host}}/{{endpoint}}/projects/{{dummy_project}}/files/file?overwrite=true&truncate=true", + "host": [ + "{{host}}" + ], + "path": [ + "{{endpoint}}", + "projects", + "{{dummy_project}}", + "files", + "file" + ], + "query": [ + { + "key": "overwrite", + "value": "true", + "equals": true, + "description": "" + }, + { + "key": "truncate", + "value": "true", + "equals": true, + "description": "" + } + ], + "variable": [] + }, "method": "POST", "header": [ { @@ -68,22 +95,15 @@ }, { "key": "Content-Type", - "value": "application/json", - "description": "", - "disabled": true + "value": "image/jpeg", + "description": "" } ], "body": { - "mode": "formdata", - "formdata": [ - { - "key": "userfile", - "description": "", - "type": "file", - "src": "checker_black.jpg", - "value": "" - } - ] + "mode": "file", + "file": { + "src": "" + } }, "description": "" }, @@ -447,7 +467,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -464,7 +487,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -481,7 +507,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -707,7 +736,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] @@ -724,7 +756,10 @@ "description": "" } ], - "body": {}, + "body": { + "mode": "raw", + "raw": "" + }, "description": "" }, "response": [] -- cgit v1.2.1