diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 00000000..e2ade56c --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,98 @@ +name: Build, Run and Test Docker Image + +on: [push] + +jobs: + build-run-test: + runs-on: ubuntu-latest + strategy: + matrix: + images: + - artifact: alfresco-elasticsearch-live-indexing-metadata + version: 4.0.1 + name: alfresco-enterprise-search-metadata + path: search/enterprise/metadata + classifier: -app.jar + group: org.alfresco + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 + + - name: Set up QEMU + uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # 3.1.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@2ad185228a349d19414702819e06df9fa4314287 # 3.4.0 + + - name: Login to Docker Hub + uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # 3.2.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Setup .netrc + run: | + echo "machine nexus.alfresco.com" >> ~/.netrc + echo "login ${{ secrets.NEXUS_USERNAME }}" >> ~/.netrc + echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc + + - name: Fetch artifacts from nexus + run: ${{ github.workspace }}/scripts/fetch-artifact.sh ${{ matrix.images.artifact }} ${{ matrix.images.version }} ${{ matrix.images.classifier }} ${{ matrix.images.group }} ${{ matrix.images.path }} + working-directory: ${{ github.workspace }} + + - name: Build Docker image + uses: docker/build-push-action@a254f8ca60a858f3136a2f1f23a60969f2c402dd # 6.4.0 + with: + context: . + tags: ${{ matrix.images.name }}:test + push: false + load: true + file: ${{ github.workspace }}/${{ matrix.images.path }}/Dockerfile + + - name: Run Docker image + run: docker run -d -p 8080:8080 ${{ matrix.images.name }}:test + + - name: Wait for container + run: sleep 30s + + - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v5.34.0 + + - name: Save Docker image + run: docker save ${{ matrix.images.name }}:test -o /tmp/${{ matrix.images.name }}.tar + + - name: Upload image as a tar for next job + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # 4.3.4 + with: + name: images + path: /tmp/${{ matrix.images.name }}.tar + + compose: + name: docker-compose + needs: build-run-test + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@2ad185228a349d19414702819e06df9fa4314287 # 3.4.0 + + - name: Download artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 + with: + name: images + path: /tmp + + - name: Load Docker images + run: | + ls -1 /tmp/*.tar | xargs --no-run-if-empty -L 1 docker load -i + docker image ls -a + + - name: Verify docker-compose + uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v5.34.0 + timeout-minutes: 10 + with: + compose_pull: false + compose_file_path: docker-compose/docker-compose.yml + quay_username: ${{ secrets.QUAY_USERNAME }} + quay_password: ${{ secrets.QUAY_PASSWORD }} + + - uses: Alfresco/alfresco-build-tools/.github/actions/docker-dump-containers-logs@v5.34.0 diff --git a/.gitignore b/.gitignore index e186b669..5c4d4348 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.zip dist +*.jar diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..d712cb92 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +--- +repos: + # General hooks section + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + args: [--allow-multiple-documents] + - id: check-merge-conflict + - id: fix-byte-order-marker + - id: mixed-line-ending + args: ["--fix=lf"] + - id: end-of-file-fixer + - repo: https://github.com/sirosen/check-jsonschema + rev: 0.14.3 + hooks: + - id: check-github-workflows diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml new file mode 100644 index 00000000..12a0c11c --- /dev/null +++ b/docker-compose/docker-compose.yml @@ -0,0 +1,193 @@ +version: "2" +services: + alfresco: + image: quay.io/alfresco/alfresco-content-repository:23.2.1 + mem_limit: 1900m + environment: + JAVA_TOOL_OPTIONS: >- + -Dencryption.keystore.type=JCEKS + -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding + -Dencryption.keyAlgorithm=DESede + -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore + -Dmetadata-keystore.password=mp6yc0UD9e + -Dmetadata-keystore.aliases=metadata + -Dmetadata-keystore.metadata.password=oKIWzVdEdA + -Dmetadata-keystore.metadata.algorithm=DESede + JAVA_OPTS: >- + -Ddb.driver=org.postgresql.Driver + -Ddb.username=alfresco + -Ddb.password=alfresco + -Ddb.url=jdbc:postgresql://postgres:5432/alfresco + -Dindex.subsystem.name=elasticsearch + -Delasticsearch.createIndexIfNotExists=true + -Delasticsearch.host=elasticsearch + -Delasticsearch.port=9200 + -Dshare.host=127.0.0.1 + -Dshare.port=8080 + -Dalfresco.host=localhost + -Dalfresco.port=8080 + -Dcsrf.filter.enabled=false + -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos + -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" + -Ddeployment.method=DOCKER_COMPOSE + -Dtransform.service.enabled=true + -Dtransform.service.url=http://transform-router:8095 + -Dsfs.url=http://shared-file-store:8099/ + -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ + -Ddsync.service.uris=http://localhost:9090/alfresco + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + healthcheck: + test: + - CMD + - curl + - -f + - http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + interval: 30s + timeout: 3s + retries: 3 + start_period: 1m + transform-router: + mem_limit: 512m + image: quay.io/alfresco/alfresco-transform-router:4.1.2 + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + ACTIVEMQ_URL: nio://activemq:61616 + CORE_AIO_URL: http://transform-core-aio:8090 + FILE_STORE_URL: >- + http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file + ports: + - "8095:8095" + depends_on: + - activemq + transform-core-aio: + image: alfresco/alfresco-transform-core-aio:5.1.2 + mem_limit: 1536m + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + ACTIVEMQ_URL: nio://activemq:61616 + FILE_STORE_URL: >- + http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file + ports: + - "8090:8090" + depends_on: + - activemq + shared-file-store: + image: quay.io/alfresco/alfresco-shared-file-store:4.1.2 + mem_limit: 512m + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + scheduler.content.age.millis: 86400000 + scheduler.cleanup.interval: 86400000 + ports: + - "8099:8099" + volumes: + - shared-file-store-volume:/tmp/Alfresco/sfs + share: + image: quay.io/alfresco/alfresco-share:23.2.1 + mem_limit: 1g + environment: + REPO_HOST: "alfresco" + REPO_PORT: "8080" + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + -Dalfresco.host=localhost + -Dalfresco.port=8080 + -Dalfresco.context=alfresco + -Dalfresco.protocol=http + postgres: + image: postgres:14.4 + mem_limit: 512m + environment: + - POSTGRES_PASSWORD=alfresco + - POSTGRES_USER=alfresco + - POSTGRES_DB=alfresco + command: postgres -c max_connections=300 -c log_min_messages=LOG + ports: + - "5432:5432" + elasticsearch: + image: elasticsearch:7.10.1 + environment: + - xpack.security.enabled=false + - discovery.type=single-node + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + cap_add: + - IPC_LOCK + ports: + - 9200:9200 + - 9300:9300 + activemq: + image: alfresco/alfresco-activemq:5.18-jre17-rockylinux8 + mem_limit: 1g + ports: + - "8161:8161" # Web Console + - "5672:5672" # AMQP + - "61616:61616" # OpenWire + - "61613:61613" # STOMP + digital-workspace: + image: quay.io/alfresco/alfresco-digital-workspace:4.4.1 + mem_limit: 128m + environment: + APP_CONFIG_PROVIDER: "ECM" + APP_CONFIG_AUTH_TYPE: "BASIC" + BASE_PATH: ./ + APP_CONFIG_PLUGIN_PROCESS_SERVICE: "false" + APP_CONFIG_PLUGIN_MICROSOFT_ONLINE: "false" + APP_BASE_SHARE_URL: "http://localhost:8080/workspace/#/preview/s" + control-center: + image: quay.io/alfresco/alfresco-control-center:8.4.1 + mem_limit: 128m + environment: + APP_CONFIG_PROVIDER: "ECM" + APP_CONFIG_AUTH_TYPE: "BASIC" + BASE_PATH: ./ + proxy: + image: alfresco/alfresco-acs-nginx:3.4.2 + mem_limit: 128m + ports: + - "8080:8080" + depends_on: + - digital-workspace + - alfresco + - share + - control-center + sync-service: + image: quay.io/alfresco/service-sync:4.0.1 + mem_limit: 1g + environment: + JAVA_OPTS: >- + -Dsql.db.driver=org.postgresql.Driver + -Dsql.db.url=jdbc:postgresql://postgres:5432/alfresco + -Dsql.db.username=alfresco + -Dsql.db.password=alfresco + -Dmessaging.broker.host=activemq + -Drepo.hostname=alfresco + -Drepo.port=8080 + -Ddw.server.applicationConnectors[0].type=http + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + ports: + - "9090:9090" + live-indexing-metadata: + image: alfresco-enterprise-search-metadata:test + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 +volumes: + shared-file-store-volume: + driver_opts: + type: tmpfs + device: tmpfs diff --git a/scripts/fetch-artifact.sh b/scripts/fetch-artifact.sh old mode 100644 new mode 100755 index cd07b5a0..cd5fc59b --- a/scripts/fetch-artifact.sh +++ b/scripts/fetch-artifact.sh @@ -7,9 +7,15 @@ DEFAULT_ARTIFACT_NAME=alfresco-content-services-distribution ARTIFACT_VERSION=$2 DEFAULT_ARTIFACT_VERSION=23.2.1 -GROUP_ID=$3 +EXTENSION=$3 +DEFAULT_EXTENSION=.zip + +GROUP_ID=$4 DEFAULT_GROUP_ID=org.alfresco +PATH_FOR_ARTIFACT=$5 +DEFAULT_PATH_FOR_ARTIFACT=./ + if [ -z "$ARTIFACT_NAME" ]; then ARTIFACT_NAME=$DEFAULT_ARTIFACT_NAME fi @@ -18,13 +24,21 @@ if [ -z "$ARTIFACT_VERSION" ]; then ARTIFACT_VERSION=$DEFAULT_ARTIFACT_VERSION fi +if [ -z "$EXTENSION" ]; then + EXTENSION=$DEFAULT_EXTENSION +fi + if [ -z "$GROUP_ID" ]; then GROUP_ID=$DEFAULT_GROUP_ID fi +if [ -z "$PATH_FOR_ARTIFACT" ]; then + PATH_FOR_ARTIFACT=$DEFAULT_PATH_FOR_ARTIFACT +fi + GROUP_ID_AS_PATH=$(echo "$GROUP_ID" | tr . /) echo "Downloading $GROUP_ID:$ARTIFACT_NAME $ARTIFACT_VERSION from Nexus" -wget --user "$NEXUS_USERNAME:$NEXUS_PASSWORD" \ - "https://nexus.alfresco.com/nexus/service/local/repositories/enterprise-releases/content/$GROUP_ID_AS_PATH/$ARTIFACT_NAME/${ARTIFACT_VERSION}/$ARTIFACT_NAME-${ARTIFACT_VERSION}.zip" +wget "https://nexus.alfresco.com/nexus/service/local/repositories/enterprise-releases/content/$GROUP_ID_AS_PATH/$ARTIFACT_NAME/${ARTIFACT_VERSION}/$ARTIFACT_NAME-${ARTIFACT_VERSION}${EXTENSION}" \ + -O $PATH_FOR_ARTIFACT/$ARTIFACT_NAME-${ARTIFACT_VERSION}${EXTENSION} diff --git a/search/enterprise/README.md b/search/enterprise/README.md new file mode 100644 index 00000000..ea229842 --- /dev/null +++ b/search/enterprise/README.md @@ -0,0 +1,18 @@ +# Runtime variables + +Sets of variables configurable with your docker image + +## metadata + +```yaml + +live-indexing-metadata: + image: alfresco-enterprise-search-metadata:YOUR-TAG + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + +``` + +- `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` +- `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` diff --git a/search/enterprise/metadata/Dockerfile b/search/enterprise/metadata/Dockerfile new file mode 100644 index 00000000..cba8b51b --- /dev/null +++ b/search/enterprise/metadata/Dockerfile @@ -0,0 +1,12 @@ +FROM quay.io/alfresco/alfresco-base-java:jre17-rockylinux9 + +ENV PORT=8080 +EXPOSE 8080 + +ADD search/enterprise/metadata/*-app.jar /opt/app.jar + +HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=1m \ + CMD curl -f http://localhost:8080/actuator/health || exit 1 + +COPY search/enterprise/metadata/entrypoint.sh /entrypoint.sh +CMD ["/entrypoint.sh"] diff --git a/search/enterprise/metadata/entrypoint.sh b/search/enterprise/metadata/entrypoint.sh new file mode 100755 index 00000000..618a57dc --- /dev/null +++ b/search/enterprise/metadata/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +exec java $JAVA_OPTS -jar /opt/app.jar 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..6e04ff81 --- /dev/null +++ b/test/postman/docker-compose/acs-test-docker-compose-collection.json @@ -0,0 +1,1576 @@ +{ + "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('