diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 74ec036205..4b8cc1b597 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -90,6 +90,7 @@ + install-alfresco @@ -130,6 +131,83 @@ + + + installAlfresco + + + + io.fabric8 + docker-maven-plugin + 0.31.0 + + + start-postgresql + generate-test-resources + + start + + + + + test-database + postgres:9.1 + + + 5432:5432 + + + alfresco + alfresco + alfresco + + + -c max_connections=300 + + + database system is ready to accept connections + + + + + + + + + + + + maven-antrun-plugin + + + fetch-installer + generate-test-resources + + run + + + + + Installing Alfresco... + + + + + + + + + + + postgresql + postgresql + 9.1-901-1.jdbc4 + + + + + + apply-rm-community 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 75a34b3cf7..3bc35169ac 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 @@ -123,7 +123,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() throws Exception { final SearchRequestBuilder sqlRequest = new SearchRequestBuilder().setQueryBuilder(queryModel) @@ -157,7 +158,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() throws Exception { final SearchRequestBuilder sqlRequest = new SearchRequestBuilder().setQueryBuilder(queryModel) @@ -191,7 +193,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() throws Exception { 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..ceb5c2d761 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,14 @@ -log4j.rootLogger=info, console +# Root logger option +log4j.rootLogger=INFO, file, stdout -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 +# Direct log messages to console +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n diff --git a/scripts/downloadInstaller.sh b/scripts/downloadInstaller.sh new file mode 100644 index 0000000000..31812860f5 --- /dev/null +++ b/scripts/downloadInstaller.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# fail script immediately on any errors in external commands and print the lines +set -ev + +outputFile="$TRAVIS_BUILD_DIR/$1/alf-installer.bin" +host="s3-eu-west-1.amazonaws.com" +contentType="binary/octet-stream" +dateValue=`TZ=GMT date -R` +stringToSign="GET\n\n${contentType}\n${dateValue}\n${S3_INSTALLER_PATH}" +signature=`echo -en ${stringToSign} | openssl sha1 -hmac $RELEASE_AWS_SECRET_KEY -binary | base64` +curl -H "Host: ${host}" \ + -H "Date: ${dateValue}" \ + -H "Content-Type: ${contentType}" \ + -H "Authorization: AWS $RELEASE_AWS_ACCESS_KEY:${signature}" \ + https://${host}${S3_INSTALLER_PATH} -o ${outputFile}