Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#502 consul integrate test #503

Merged
merged 19 commits into from
Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 97 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@
<version.error_prone_core>2.0.15</version.error_prone_core>
<version.lifecycle-mapping>1.0.0</version.lifecycle-mapping>
<version.maven-gpg>1.6</version.maven-gpg>
<version.testcontainers>1.8.0</version.testcontainers>
<argLine>-Xmx512m</argLine>
<skip.unit.tests>false</skip.unit.tests>
<matched.test.resources>**/*</matched.test.resources>
</properties>

<modules>
Expand Down Expand Up @@ -467,7 +470,7 @@
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_common</artifactId>
<version>${version.prometheus}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
Expand Down Expand Up @@ -603,6 +606,12 @@
<version>${version.httpclient}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -623,7 +632,7 @@
<filtering>false</filtering>
<directory>${basedir}/src/test/resources</directory>
<includes>
<include>**/*</include>
<include>${matched.test.resources}</include>
</includes>
</testResource>
</testResources>
Expand Down Expand Up @@ -689,55 +698,14 @@
<version>${version.maven-surefire}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.maven-surefire}</version>
<configuration>
<encoding>UTF-8</encoding>
<!-- Skips unit tests if the value of skip.unit.tests property is true -->
<skipTests>${skip.unit.tests}</skipTests>
<!-- Excludes integration tests when unit tests are run -->
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${version.build-helper-maven}</version>
<executions>
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}\src\integration\java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-resource</id>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<!-- Don't forget <directory> label -->
<directory>${project.basedir}\src\integration\resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- JACOCO added for code coverage -->
<plugin>
Expand Down Expand Up @@ -882,6 +850,12 @@
<profiles>
<profile>
<id>dev</id>
<properties>
<!--
Only unit tests are run when the development profile is active
-->
<skip.unit.tests>false</skip.unit.tests>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -972,5 +946,79 @@
</plugins>
</build>
</profile>
<!-- The Configuration of the integration-test profile -->
<profile>
<id>integration-test</id>
<properties>
<!--
Only integration tests are run when the integration-test profile is active
-->
<skip.unit.tests>true</skip.unit.tests>
<!--to include nothing for regular unit resources-->
<matched.test.resources>a^</matched.test.resources>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.maven-surefire}</version>
<executions>
<!--
Invokes both the integration-test and the verify goals of the
Failsafe Maven plugin
-->
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<!--
Skips integration tests if the value of skip.integration.tests
property is true
-->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${version.build-helper-maven}</version>
<executions>
<execution>
<id>add-integration-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/integration/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-integration-test-resource</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<!-- Don't forget <directory> label -->
<directory>${project.basedir}/src/integration/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
5 changes: 5 additions & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading