diff --git a/test/postman/docker-compose/acs-test-docker-compose-collection.json b/test/postman/docker-compose/acs-test-docker-compose-collection.json new file mode 100644 index 00000000..3cabbe49 --- /dev/null +++ b/test/postman/docker-compose/acs-test-docker-compose-collection.json @@ -0,0 +1,1652 @@ +{ + "info": { + "_postman_id": "e5bdcb1a-bd5d-4e2e-bd37-733dcae20374", + "name": "acs-test-docker-compose-collection", + "description": "The Suite of cases tests ACS basic wiring:\n1) Acs-basic-auth\n* Request to validate the discovery api\n* Request to validate modules are applied correctly", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "01 ACS-basic-auth", + "item": [ + { + "name": "repo-discovery", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "", + "pm.globals.get(\"url\");", + "", + "", + "pm.test(\"validateStatusCodeTest\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "var jsonData = pm.response.json();", + "", + "pm.test(\"validateLicenseTest\", function () {", + " pm.expect(jsonData.entry.repository.edition).to.be.oneOf([\"Enterprise\",\"Community\"]);", + " pm.environment.set(\"repositoryEdition\", jsonData.entry.repository.edition);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/api/discovery", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "api", + "discovery" + ] + }, + "description": "This request will validate whether the repo is set up correctly " + }, + "response": [] + }, + { + "name": "create a folder", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.globals.get(\"url\");", + "", + "pm.test(\"canCreateAFolderTest\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.environment.set(\"folderId\", pm.response.json().entry.id);", + "pm.environment.set(\"folderName\", pm.response.json().entry.name);", + "", + "console.log(\"folderId:\"+pm.environment.get(\"folderId\"));", + "console.log(\"folderName:\"+pm.environment.get(\"folderName\"));" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\":\"MyFunkyNameForTestingPersistency\",\r\n \"nodeType\":\"cm:folder\"\r\n}" + }, + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children?autoRename=true", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "api", + "-default-", + "public", + "alfresco", + "versions", + "1", + "nodes", + "-my-", + "children" + ], + "query": [ + { + "key": "autoRename", + "value": "true" + } + ] + }, + "description": "This request will validate whether the repo is set up correctly " + }, + "response": [] + }, + { + "name": "create content in folder", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"check number created\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.count).to.eql(2);", + "});" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"folderPath\":\"{{folderName}}\",\r\n \"fileCount\":\"2\",\r\n \"forceBinaryStorage\":\"true\",\r\n \"minFileSize\":\"22\",\r\n \"maxFileSize\":\"42\"\r\n}" + }, + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/s/api/model/filefolder/load", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "s", + "api", + "model", + "filefolder", + "load" + ] + } + }, + "response": [] + }, + { + "name": "list content in folder", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = pm.response.json();", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"check number created\", function () {", + " pm.expect(jsonData.list.pagination.count).to.eql(2);", + "});", + "", + "var entry = jsonData.list.entries[0].entry;", + "pm.environment.set(\"contentId\", entry.id);", + "pm.environment.set(\"contentName\", entry.name);", + "pm.environment.set(\"contentLength\", entry.content.sizeInBytes);", + "", + "console.log(\"contentId:\"+pm.environment.get(\"contentId\"));", + "console.log(\"contentName:\"+pm.environment.get(\"contentName\"));", + "console.log(\"contentLength:\"+pm.environment.get(\"contentLength\"));" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/api/-default-/public/alfresco/versions/1/nodes/{{folderId}}/children", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "api", + "-default-", + "public", + "alfresco", + "versions", + "1", + "nodes", + "{{folderId}}", + "children" + ] + } + }, + "response": [] + }, + { + "name": "set content", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "So Long, and Thanks for All the Fish!" + }, + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/api/-default-/public/alfresco/versions/1/nodes/{{contentId}}/content", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "api", + "-default-", + "public", + "alfresco", + "versions", + "1", + "nodes", + "{{contentId}}", + "content" + ] + } + }, + "response": [] + }, + { + "name": "get content", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Content is correct\", function () {", + " pm.response.to.have.body(\"So Long, and Thanks for All the Fish!\");", + "});" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/api/-default-/public/alfresco/versions/1/nodes/{{contentId}}/content", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "api", + "-default-", + "public", + "alfresco", + "versions", + "1", + "nodes", + "{{contentId}}", + "content" + ] + } + }, + "response": [] + }, + { + "name": "validate cluster get", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.globals.get(\"url\");", + "", + "// only run this test if it's an Enterprise repo", + "if (pm.environment.get(\"repositoryEdition\") == \"Enterprise\")", + "{", + " /*", + " if you don't call this method first, the POST alfresco/s/enterprise/admin/admin-clustering-test fails", + " */", + " pm.test(\"callGetValidateClusterForInitializationTest\", function () ", + " {", + " pm.response.to.have.status(200);", + " });", + "", + " pm.globals.set(\"alf-csrftoken\", pm.cookies.get(\"alf-csrftoken\"));", + "} ", + "else", + "{", + " pm.test(\"testResponseStatusIs404ForCommunity\", function ()", + " {", + " pm.response.to.have.status(404);", + " });", + "}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/s/enterprise/admin/admin-clustering-test", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "s", + "enterprise", + "admin", + "admin-clustering-test" + ] + } + }, + "response": [] + }, + { + "name": "Validate Share", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "", + "pm.globals.get(\"url\");", + "", + "pm.test(\"shareIsUpAndRunningTest\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/share/page", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "share", + "page" + ] + }, + "description": "Validate Share is deployed correctly" + }, + "response": [] + }, + { + "name": "Validate Digital Workspace", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "", + "pm.globals.get(\"url\");", + "", + "// only run this test if it's an Enterprise repo", + "if (pm.environment.get(\"repositoryEdition\") == \"Enterprise\")", + "{", + " pm.test(\"adwIsUpAndRunningTest\", function () {", + " pm.response.to.have.status(200);", + " });", + "", + " pm.test(\"Check that body matches string\", function () {", + " pm.expect(pm.response.text()).to.include(\"Alfresco Digital Workspace\");", + " });", + "}", + "else", + "{", + " pm.test(\"testResponseStatusIs404ForCommunity\", function ()", + " {", + " pm.response.to.have.status(404);", + " });", + "}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/workspace", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "workspace" + ] + }, + "description": "Validate Digital Workspace is deployed correctly" + }, + "response": [] + }, + { + "name": "google-docs", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.globals.get(\"url\");", + "", + "pm.test(\"validateGoogleDocsImageTest\", function () ", + "{", + " pm.response.to.have.status(200);", + "});", + "" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/share/res/components/documentlibrary/actions/google-edit-flat-16.png", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "share", + "res", + "components", + "documentlibrary", + "actions", + "google-edit-flat-16.png" + ] + } + }, + "response": [] + }, + { + "name": "share-alfresco-proxy", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.globals.get(\"url\");", + "", + "pm.test(\"searchAlfrescoProxyStatusCodeTest\", function () {", + " pm.response.to.have.status(403);", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/share/service/proxy/alfresco/api/solr/aclchangesets?fromId=1&maxResults=5", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "share", + "service", + "proxy", + "alfresco", + "api", + "solr", + "aclchangesets" + ], + "query": [ + { + "key": "fromId", + "value": "1" + }, + { + "key": "maxResults", + "value": "5" + } + ] + } + }, + "response": [] + }, + { + "name": "share-alfresco-noauth-proxy", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.globals.get(\"url\");", + "", + "pm.test(\"searchAlfrescoNoauthProxyStatusCodeTest\", function () {", + " pm.response.to.have.status(403);", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/share/proxy/alfresco-noauth/api/solr/aclchangesets?fromId=1&maxResults=5", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "share", + "proxy", + "alfresco-noauth", + "api", + "solr", + "aclchangesets" + ], + "query": [ + { + "key": "fromId", + "value": "1" + }, + { + "key": "maxResults", + "value": "5" + } + ] + } + }, + "response": [] + }, + { + "name": "share-alfresco-feed-proxy", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.globals.get(\"url\");", + "", + "pm.test(\"searchAlfrescoFeedProxyStatusCodeTest\", function () {", + " pm.response.to.have.status(403);", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/share/proxy/alfresco-feed/api/solr/aclchangesets?fromId=1&maxResults=5", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "share", + "proxy", + "alfresco-feed", + "api", + "solr", + "aclchangesets" + ], + "query": [ + { + "key": "fromId", + "value": "1" + }, + { + "key": "maxResults", + "value": "5" + } + ] + } + }, + "response": [] + }, + { + "name": "alfresco-prometheus ", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.globals.get(\"url\");", + "", + "// only run this test if it's an Enterprise repo", + "if (pm.environment.get(\"repositoryEdition\") == \"Enterprise\")", + "{", + " pm.test(\"prometheusAlfrescoStatusCodeTest\", function () {", + " pm.response.to.have.status(403);", + " });", + "}", + "else", + "{", + " pm.test(\"testResponseStatusIs404ForCommunity\", function ()", + "{", + " pm.response.to.have.status(404);", + " });", + "}" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "type": "any" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/s/prometheus", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "s", + "prometheus" + ] + } + }, + "response": [] + }, + { + "name": "solr-external-access", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.globals.get(\"url\");", + "", + "pm.test(\"solrExternalAccessStatusCodeTest\", function () {", + " pm.response.to.have.status(404);", + "});", + "" + ] + } + } + ], + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/solr", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "solr" + ] + }, + "description": "Check to confirm `/solr` endpoint is disabled." + }, + "response": [] + }, + { + "name": "webdav-validation", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Body matches string\", function () {", + " pm.expect(pm.response.text()).to.include(\"Directory listing for /\");", + " pm.expect(pm.response.text()).to.include(\"Shared\");", + " pm.expect(pm.response.text()).to.include(\"Sites\");", + " pm.expect(pm.response.text()).to.include(\"Data Dictionary\");", + "});" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/webdav", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "webdav" + ] + } + }, + "response": [] + }, + { + "name": "aos-validation", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Body matches string\", function () {", + " pm.expect(pm.response.text()).to.include(\"/alfresco/aos\");", + " pm.expect(pm.response.text()).to.include(\"Shared\");", + " pm.expect(pm.response.text()).to.include(\"Sites\");", + " pm.expect(pm.response.text()).to.include(\"Data Dictionary\");", + "});" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{protocol}}://{{url}}/alfresco/aos", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "alfresco", + "aos" + ] + } + }, + "response": [] + }, + { + "name": "aos propfind root", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 207\", function () {", + " pm.response.to.have.status(207);", + "});", + "", + "pm.test(\"Response contains the header MicrosoftSharePointTeamServices\", function () {", + " pm.response.to.have.header(\"MicrosoftSharePointTeamServices\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "admin", + "type": "string" + }, + { + "key": "username", + "value": "admin", + "type": "string" + }, + { + "key": "saveHelperData", + "value": false, + "type": "boolean" + }, + { + "key": "showPassword", + "value": false, + "type": "boolean" + } + ] + }, + "method": "PROPFIND", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{protocol}}://{{url}}/", + "protocol": "{{protocol}}", + "host": [ + "{{url}}" + ], + "path": [ + "" + ] + } + }, + "response": [] + }, + { + "name": "aos get vti inf", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Body matches string\", function () {", + " pm.expect(pm.response.text()).to.include('