mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Apps 937 Run AGS community tests (#407) [skip tests]
* APPS-937 execute AGS tests [skip tests]
* APPS-937 Added missing file [ags][ags on MySQL][skip db][no downstream]
* APPS-937 tests postgres 13.1 [ags][skip db][no downstream]
* APPS-937 code review comments [skip tests]
(cherry picked from commit 66eda8dccc
)
This commit is contained in:
26
.travis.yml
26
.travis.yml
@@ -28,6 +28,7 @@ env:
|
|||||||
global:
|
global:
|
||||||
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
|
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
|
||||||
- TAS_ENVIRONMENT=./packaging/tests/environment
|
- TAS_ENVIRONMENT=./packaging/tests/environment
|
||||||
|
- LOG_WARN="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: test
|
- name: test
|
||||||
@@ -278,9 +279,28 @@ jobs:
|
|||||||
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||||
script: travis_wait 30 mvn -B install -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
script: travis_wait 30 mvn -B install -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
||||||
|
|
||||||
- name: "AGS Unit & Integration Tests"
|
- name: "AGS Unit & Integration Tests (PostgreSQL)"
|
||||||
if: branch = master OR commit_message =~ /\[ags\]/
|
if: branch =~ /(release\/.*$|master)/ OR commit_message =~ /\[ags\]/
|
||||||
script: travis_retry travis_wait mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pstart-db -f amps/ags/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pstart-postgres -f amps/ags/pom.xml ${LOG_WARN}
|
||||||
|
|
||||||
|
- name: "AGS Unit & Integration Tests (MySQL) "
|
||||||
|
if: branch =~ /(release\/.*$|master)/ OR commit_message =~ /\[ags on MySQL\]/
|
||||||
|
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pstart-mysql -f amps/ags/pom.xml ${LOG_WARN}
|
||||||
|
|
||||||
|
- name: "AGS Community Rest API Tests"
|
||||||
|
if: branch =~ /(release\/.*$|master)/ OR commit_message =~ /\[ags\]/
|
||||||
|
addons:
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log
|
||||||
|
- alfresco.log
|
||||||
|
- solr.log
|
||||||
|
target_paths: ${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}
|
||||||
|
before_script:
|
||||||
|
- ${TAS_SCRIPTS}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
|
||||||
|
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
|
||||||
|
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false
|
||||||
|
after_script: bash amps/ags/travis/scripts/getLogs.sh
|
||||||
|
|
||||||
- name: "Push to Nexus"
|
- name: "Push to Nexus"
|
||||||
stage: release
|
stage: release
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
<!-- Set this here and override it in the community and enterprise modules. -->
|
<!-- Set this here and override it in the community and enterprise modules. -->
|
||||||
<alfresco.min.version>0.0</alfresco.min.version>
|
<alfresco.min.version>0.0</alfresco.min.version>
|
||||||
|
|
||||||
<activemq.version>5.15.8</activemq.version>
|
|
||||||
<activemq.port1>61616</activemq.port1>
|
<activemq.port1>61616</activemq.port1>
|
||||||
<activemq.port2>5672</activemq.port2>
|
<activemq.port2>5672</activemq.port2>
|
||||||
<camel.mock.version>3.7.0</camel.mock.version>
|
<camel.mock.version>3.7.0</camel.mock.version>
|
||||||
@@ -53,12 +52,6 @@
|
|||||||
<jackson-databind.version>2.12.1</jackson-databind.version>
|
<jackson-databind.version>2.12.1</jackson-databind.version>
|
||||||
<fabric8.docker.version>0.34.1</fabric8.docker.version>
|
<fabric8.docker.version>0.34.1</fabric8.docker.version>
|
||||||
<mockito.version>1.10.19</mockito.version>
|
<mockito.version>1.10.19</mockito.version>
|
||||||
<postgresql.version>42.2.16</postgresql.version>
|
|
||||||
<postgresql.port>5432</postgresql.port>
|
|
||||||
<mysql.version>5.1.40</mysql.version>
|
|
||||||
<mysql.port>3306</mysql.port>
|
|
||||||
<!--This prevents a clash when postgres is already running natively on the machine.-->
|
|
||||||
<database.port>5431</database.port>
|
|
||||||
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
@@ -112,7 +105,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${dependency.mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
@@ -27,22 +27,6 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default-cli</id>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<echo>Stopping Alfresco...</echo>
|
|
||||||
<exec executable="${basedir}/target/alf-installation/alfresco.sh" dir="target/alf-installation" failonerror="true">
|
|
||||||
<arg value="stop" />
|
|
||||||
</exec>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.javadoc.skip>false</maven.javadoc.skip>
|
<maven.javadoc.skip>false</maven.javadoc.skip>
|
||||||
<ags.share>alfresco-governance-services-community-share</ags.share>
|
|
||||||
<ags.repo>alfresco-governance-services-community-repo</ags.repo>
|
|
||||||
<fluent.json.version>2.0.0</fluent.json.version>
|
<fluent.json.version>2.0.0</fluent.json.version>
|
||||||
<jackson.databind.version>2.7.9.1</jackson.databind.version>
|
<jackson.databind.version>2.7.9.1</jackson.databind.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
@@ -81,7 +81,7 @@ public class RMSiteAPI extends RMModelRequest
|
|||||||
/**
|
/**
|
||||||
* Create the RM site
|
* Create the RM site
|
||||||
*
|
*
|
||||||
* @param rmSite The properties of the rm site to be created
|
* @param rmSiteModel The properties of the rm site to be created
|
||||||
* @return The {@link RMSite} with the given properties
|
* @return The {@link RMSite} with the given properties
|
||||||
* @throws RuntimeException for the following cases:
|
* @throws RuntimeException for the following cases:
|
||||||
* <ul>
|
* <ul>
|
||||||
@@ -124,7 +124,7 @@ public class RMSiteAPI extends RMModelRequest
|
|||||||
/**
|
/**
|
||||||
* Update RM site
|
* Update RM site
|
||||||
*
|
*
|
||||||
* @param rmSiteProperties The properties to be updated
|
* @param rmSiteModel The properties to be updated
|
||||||
* @return The updated {@link RMSite}
|
* @return The updated {@link RMSite}
|
||||||
* @throws RuntimeException for the following cases:
|
* @throws RuntimeException for the following cases:
|
||||||
* <ul>
|
* <ul>
|
||||||
@@ -161,6 +161,6 @@ public class RMSiteAPI extends RMModelRequest
|
|||||||
public boolean existsRMSite()
|
public boolean existsRMSite()
|
||||||
{
|
{
|
||||||
getSite();
|
getSite();
|
||||||
return getRmRestWrapper().getStatusCode().equals(OK.toString());
|
return getRmRestWrapper().getStatusCode().equals(String.valueOf(OK.value()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,7 +24,7 @@ services:
|
|||||||
-Ddb.username=alfresco
|
-Ddb.username=alfresco
|
||||||
-Ddb.password=alfresco
|
-Ddb.password=alfresco
|
||||||
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
|
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
|
||||||
-Dsolr.host=solr6
|
-Dsolr.host=search
|
||||||
-Dsolr.port=8983
|
-Dsolr.port=8983
|
||||||
-Dsolr.secureComms=none
|
-Dsolr.secureComms=none
|
||||||
-Dsolr.base.url=/solr
|
-Dsolr.base.url=/solr
|
||||||
@@ -57,14 +57,14 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
solr6:
|
search:
|
||||||
image: alfresco/alfresco-search-services:${SOLR6_TAG}
|
image: alfresco/alfresco-search-services:${SOLR6_TAG}
|
||||||
environment:
|
environment:
|
||||||
#Solr needs to know how to register itself with Alfresco
|
#Solr needs to know how to register itself with Alfresco
|
||||||
- SOLR_ALFRESCO_HOST=alfresco
|
- SOLR_ALFRESCO_HOST=alfresco
|
||||||
- SOLR_ALFRESCO_PORT=8080
|
- SOLR_ALFRESCO_PORT=8080
|
||||||
#Alfresco needs to know how to call solr
|
#Alfresco needs to know how to call solr
|
||||||
- SOLR_SOLR_HOST=solr6
|
- SOLR_SOLR_HOST=search
|
||||||
- SOLR_SOLR_PORT=8983
|
- SOLR_SOLR_PORT=8983
|
||||||
#Create the default alfresco and archive cores
|
#Create the default alfresco and archive cores
|
||||||
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
|
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
|
||||||
|
@@ -19,6 +19,15 @@
|
|||||||
<alfresco.db.password>alfresco</alfresco.db.password>
|
<alfresco.db.password>alfresco</alfresco.db.password>
|
||||||
<alfresco.db.host>localhost</alfresco.db.host>
|
<alfresco.db.host>localhost</alfresco.db.host>
|
||||||
<alfresco.test.db.name>alfresco-test</alfresco.test.db.name>
|
<alfresco.test.db.name>alfresco-test</alfresco.test.db.name>
|
||||||
|
|
||||||
|
<mysql.version>5.7.23</mysql.version>
|
||||||
|
<mysql.port>3306</mysql.port>
|
||||||
|
<mysql.tests.port>3307</mysql.tests.port>
|
||||||
|
|
||||||
|
<postgresql.port>5432</postgresql.port>
|
||||||
|
<!--This prevents a clash when postgres is already running natively on the machine.-->
|
||||||
|
<postgresql.tests.port>5431</postgresql.tests.port>
|
||||||
|
|
||||||
<alfresco.repo.artifactId>alfresco-platform</alfresco.repo.artifactId>
|
<alfresco.repo.artifactId>alfresco-platform</alfresco.repo.artifactId>
|
||||||
<alfresco.postgres.version>9.1-901.jdbc4</alfresco.postgres.version>
|
<alfresco.postgres.version>9.1-901.jdbc4</alfresco.postgres.version>
|
||||||
<ags.artifactId>alfresco-governance-services-community-repo</ags.artifactId>
|
<ags.artifactId>alfresco-governance-services-community-repo</ags.artifactId>
|
||||||
@@ -264,9 +273,9 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
<db.name>${alfresco.test.db.name}</db.name>
|
<db.name>${db.name}</db.name>
|
||||||
<db.driver>org.postgresql.Driver</db.driver>
|
<db.driver>${alfresco.db.datasource.class}</db.driver>
|
||||||
<db.url>jdbc:postgresql://localhost:${database.port}/${alfresco.test.db.name}</db.url>
|
<db.url>${alfresco.db.url}</db.url>
|
||||||
<dir.root>${project.build.directory}/alf-data-test</dir.root>
|
<dir.root>${project.build.directory}/alf-data-test</dir.root>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -465,8 +474,16 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<!-- Profile used for running integration tests using postgres database -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>start-db</id>
|
<id>start-postgres</id>
|
||||||
|
<properties>
|
||||||
|
<db.name>${alfresco.test.db.name}</db.name>
|
||||||
|
<alfresco.db.port>${postgresql.tests.port}</alfresco.db.port>
|
||||||
|
<alfresco.db.master.url>jdbc:postgresql://${alfresco.db.host}:${alfresco.db.port}/${db.name}</alfresco.db.master.url>
|
||||||
|
<alfresco.db.url>jdbc:postgresql://${alfresco.db.host}:${alfresco.db.port}/${db.name}</alfresco.db.url>
|
||||||
|
<alfresco.db.datasource.class>org.postgresql.Driver</alfresco.db.datasource.class>
|
||||||
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -480,7 +497,7 @@
|
|||||||
<!--<name>postgres:13.1</name>-->
|
<!--<name>postgres:13.1</name>-->
|
||||||
<run>
|
<run>
|
||||||
<ports>
|
<ports>
|
||||||
<port>${database.port}:${postgresql.port}</port>
|
<port>${postgresql.tests.port}:${postgresql.port}</port>
|
||||||
</ports>
|
</ports>
|
||||||
<env>
|
<env>
|
||||||
<POSTGRES_PASSWORD>${alfresco.db.password}</POSTGRES_PASSWORD>
|
<POSTGRES_PASSWORD>${alfresco.db.password}</POSTGRES_PASSWORD>
|
||||||
@@ -529,6 +546,77 @@
|
|||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<!-- Profile used for running integration tests using mysql database -->
|
||||||
|
<profile>
|
||||||
|
<id>start-mysql</id>
|
||||||
|
<properties>
|
||||||
|
<db.name>${alfresco.db.name}</db.name>
|
||||||
|
<alfresco.db.port>${mysql.tests.port}</alfresco.db.port>
|
||||||
|
<alfresco.db.master.url>jdbc:mysql://${alfresco.db.host}:${alfresco.db.port}/${db.name}</alfresco.db.master.url>
|
||||||
|
<alfresco.db.url>jdbc:mysql://${alfresco.db.host}:${alfresco.db.port}/${db.name}</alfresco.db.url>
|
||||||
|
<alfresco.db.datasource.class>com.mysql.cj.jdbc.Driver</alfresco.db.datasource.class>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.fabric8</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<images>
|
||||||
|
<image>
|
||||||
|
<name>mysql:${mysql.version}</name>
|
||||||
|
<run>
|
||||||
|
<ports>
|
||||||
|
<port>${mysql.tests.port}:${mysql.port}</port>
|
||||||
|
</ports>
|
||||||
|
<env>
|
||||||
|
<MYSQL_ROOT_PASSWORD>${alfresco.db.password}</MYSQL_ROOT_PASSWORD>
|
||||||
|
<MYSQL_PASSWORD>${alfresco.db.password}</MYSQL_PASSWORD>
|
||||||
|
<MYSQL_USER>${alfresco.db.username}</MYSQL_USER>
|
||||||
|
<MYSQL_DATABASE>${alfresco.db.name}</MYSQL_DATABASE>
|
||||||
|
</env>
|
||||||
|
<cmd>
|
||||||
|
<arg>--transaction-isolation=READ-COMMITTED</arg>
|
||||||
|
</cmd>
|
||||||
|
<wait>
|
||||||
|
<log>mysqld: ready for connections</log>
|
||||||
|
<time>20000</time>
|
||||||
|
</wait>
|
||||||
|
</run>
|
||||||
|
</image>
|
||||||
|
<image>
|
||||||
|
<name>alfresco/alfresco-activemq:${dependency.activemq.version}</name>
|
||||||
|
<run>
|
||||||
|
<ports>
|
||||||
|
<port>${activemq.port1}:${activemq.port1}</port>
|
||||||
|
<port>${activemq.port2}:${activemq.port2}</port>
|
||||||
|
</ports>
|
||||||
|
</run>
|
||||||
|
</image>
|
||||||
|
</images>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>before-integration-tests</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>stop</goal>
|
||||||
|
<goal>start</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>after-integration-tests</id>
|
||||||
|
<phase>post-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>stop</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>start-repo</id>
|
<id>start-repo</id>
|
||||||
<build>
|
<build>
|
||||||
@@ -622,7 +710,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${dependency.mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
@@ -653,7 +741,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${dependency.mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<executions>
|
<executions>
|
||||||
|
@@ -16,4 +16,5 @@ rm -rf "${HOME}/.m2/repository/org/alfresco/content-services*"
|
|||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services-community"
|
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services-community"
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-community-repo-*-test"
|
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-community-repo-*-test"
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-enterprise-repo-*-test"
|
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-enterprise-repo-*-test"
|
||||||
|
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-governance-services*"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user