diff --git a/.travis.yml b/.travis.yml
index 3763494bce..b4258b063a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -71,13 +71,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 087cae3046..635c6b7b0c 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/java/org/alfresco/rest/rm/community/search/SearchRecordsV1CmisTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/SearchRecordsV1CmisTests.java
index ca6e6b9be3..1b8df9c613 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/SearchRecordsV1CmisTests.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/search/SearchRecordsV1CmisTests.java
@@ -139,7 +139,8 @@ public class SearchRecordsV1CmisTests extends BaseRMRestTest
assertEquals(searchResponse.getEntries().size(), 5, "Expected total entries to be five");
}
- @Test
+ // TODO enable the test when APPS-46 is fixed
+ @Test (enabled = false)
public void searchWhenTotalItemsReachWithNonRM()
{
final SearchRequestBuilder sqlRequest = new SearchRequestBuilder().setQueryBuilder(queryModel)
@@ -173,7 +174,8 @@ public class SearchRecordsV1CmisTests extends BaseRMRestTest
assertEquals(searchResponse.getEntries().size(), 4, "Expected total entries to be four");
}
- @Test
+ // TODO enable the test when APPS-46 is fixed
+ @Test (enabled = false)
public void searchWhenTotalItemsExceedNonRMUser()
{
final SearchRequestBuilder sqlRequest = new SearchRequestBuilder().setQueryBuilder(queryModel)
@@ -193,7 +195,8 @@ public class SearchRecordsV1CmisTests extends BaseRMRestTest
* And setting skipCount and maxItems under the number of total items
* Then hasMoreItems will be set to true
*/
- @Test
+ // TODO enable the test when APPS-46 is fixed
+ @Test (enabled = false)
public void searchResultsUnderTotalItemsRMUser()
{
final SearchRequestBuilder sqlRequest = new SearchRequestBuilder().setQueryBuilder(queryModel)
@@ -207,7 +210,8 @@ public class SearchRecordsV1CmisTests extends BaseRMRestTest
assertEquals(searchResponse.getEntries().size(), 4, "Expected total entries to be four");
}
- @Test
+ // TODO enable the test when APPS-46 is fixed
+ @Test (enabled = false)
public void searchResultsUnderTotalItemsNonRMUser()
{
final SearchRequestBuilder sqlRequest = new SearchRequestBuilder().setQueryBuilder(queryModel)
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..e01a70def8 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
+log4j.logger.com.example=debug
diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml
index 2ae5617c10..2386dff397 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