From 1332c1dc506a0ffc7c7a79e58f5e03af44f7c672 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 30 Sep 2020 08:07:26 +0300 Subject: [PATCH] Merge pull request #1235 from Alfresco/merge-3.1/APPS-236_RunCRTests_merge3.1_no Apps-236 run community rest api tests on 3.1 # Conflicts: # rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/SearchRecordsV1CmisTests.java --- .travis.yml | 21 +- rm-automation/pom.xml | 247 ------------------ .../src/test/resources/log4j.properties | 12 +- rm-community/rm-community-repo/pom.xml | 1 + 4 files changed, 25 insertions(+), 256 deletions(-) diff --git a/.travis.yml b/.travis.yml index e498ff2fc5..77dc6e60d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,13 +70,24 @@ jobs: - echo "Enterprise Integrations Tests on MySQL" - name: "Community Rest API Tests" stage: Tests - before_install: - - travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am install: - - bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH + - | + if [[ ${TRAVIS_BRANCH} == *community* ]]; then + travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am + else + travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am + fi + - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-community-rest-api -am + before_script: + - | + if [[ ${TRAVIS_BRANCH} == *community* ]]; then + bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH + else + bash scripts/startAlfresco.sh $ENTERPRISE_REPO_PATH + fi - bash scripts/waitForAlfrescoToStart.sh - script: - - echo "Community Rest API Tests" + script: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false + after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - name: "Enterprise Rest API Tests" stage: Tests before_install: diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index e9c53b055d..823172887f 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -86,251 +86,4 @@ - - - - install-alfresco - - - - maven-antrun-plugin - - - fetch-installer - generate-test-resources - - run - - - - Recreating database... - drop database if exists alfresco; create database alfresco - Downloading Alfresco installer... - - - Installing Alfresco... - - - - - - - - - - - postgresql - postgresql - 9.1-901-1.jdbc4 - - - - - - - - apply-ags-community - - - - maven-dependency-plugin - - - fetch-amps - process-test-resources - - copy - - - - - org.alfresco - alfresco-governance-services-community-share - ${project.version} - amp - - - org.alfresco - alfresco-governance-services-community-repo - ${project.version} - amp - - - ${project.build.directory}/amps - true - - - - - - org.alfresco.maven.plugin - alfresco-maven-plugin - true - - - install-community-repo-amp - - install - - process-test-resources - - true - - ${project.build.directory}/amps/alfresco-governance-services-community-repo-${project.version}.amp - - ${project.build.directory}/alf-installation/tomcat/webapps/alfresco.war - - - - - install-community-share-amp - - install - - process-test-resources - - true - - ${project.build.directory}/amps/alfresco-governance-services-community-share-${project.version}.amp - - ${project.build.directory}/alf-installation/tomcat/webapps/share.war - - - - - - - - - - apply-ags-enterprise - - - - maven-dependency-plugin - - - fetch-amps - process-test-resources - - copy - - - - - org.alfresco - ${ags.share} - ${project.version} - amp - - - org.alfresco - ${ags.repo} - ${project.version} - amp - - - ${project.build.directory}/amps - true - - - - - - org.alfresco.maven.plugin - alfresco-maven-plugin - true - - - install-enterprise-repo-amp - - install - - process-test-resources - - true - ${project.build.directory}/amps/${ags.repo}-${project.version}.amp - ${project.build.directory}/alf-installation/tomcat/webapps/alfresco.war - - - - install-enterprise-share-amp - - install - - process-test-resources - - true - ${project.build.directory}/amps/${ags.share}-${project.version}.amp - ${project.build.directory}/alf-installation/tomcat/webapps/share.war - - - - - - - - - run-alfresco - - - - org.jacoco - jacoco-maven-plugin - 0.7.5.201505241946 - - - prepare-jacoco - - prepare-agent - - - - - - org.alfresco.* - - - - - maven-antrun-plugin - - - start-alfresco - process-test-classes - - run - - - - Starting Alfresco... - - - - - - - - - - stop-alfresco - post-integration-test - - run - - - - Stopping Alfresco... - - - - - - - - - - - - diff --git a/rm-automation/rm-automation-community-rest-api/src/test/resources/log4j.properties b/rm-automation/rm-automation-community-rest-api/src/test/resources/log4j.properties index 93c931c03c..1097053d21 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/resources/log4j.properties +++ b/rm-automation/rm-automation-community-rest-api/src/test/resources/log4j.properties @@ -1,7 +1,11 @@ -log4j.rootLogger=info, console +# Root logger option +log4j.rootLogger=INFO, file -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +# Direct log messages to a log file +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=./target/reports/rm-automation-community-rest-api.log +log4j.appender.file.MaxBackupIndex=10 +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=[%t] %d{HH:mm:ss} %-5p %c{1}:%L - %m%n log4j.logger.com.example=debug \ No newline at end of file diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index 12788ad0bf..0d6a13c5ca 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -141,6 +141,7 @@ integration-test integration-test + verify