This is an automated email from the ASF dual-hosted git repository.

ramu12 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new a4ac6b4  "CAMEL-13454:camel-testcontainers - Should build if no docker"
a4ac6b4 is described below

commit a4ac6b4ecd3251696aae3fd8539f1d48ad75a7ac
Author: Kodanda Ramu Kakarla <kkaka...@kkakarla.pnq.csb>
AuthorDate: Fri Jul 19 18:53:34 2019 +0530

    "CAMEL-13454:camel-testcontainers - Should build if no docker"
---
 components/camel-testcontainers-spring/pom.xml     | 83 ----------------------
 .../spring/ContainerAwareSpringTestSupport.java    |  3 +
 2 files changed, 3 insertions(+), 83 deletions(-)

diff --git a/components/camel-testcontainers-spring/pom.xml 
b/components/camel-testcontainers-spring/pom.xml
index d9b7072..c2f66c1 100644
--- a/components/camel-testcontainers-spring/pom.xml
+++ b/components/camel-testcontainers-spring/pom.xml
@@ -72,87 +72,4 @@
         </dependency>
 
     </dependencies>
-
-    <profiles>
-        <profile>
-            <id>testcontainers-spring-skip-tests</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <configuration>
-                            <skipTests>true</skipTests>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <!-- activate integration test if the docker socket file is accessible 
-->
-        <profile>
-            <id>testcontainers-spring-integration-tests-docker-file</id>
-            <activation>
-                <file>
-                    <exists>/var/run/docker.sock</exists>
-                </file>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-failsafe-plugin</artifactId>
-                        <configuration>
-                            <skipTests>${skipTests}</skipTests>
-                            <systemPropertyVariables>
-                                
<visibleassertions.silence>true</visibleassertions.silence>
-                            </systemPropertyVariables>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <!-- activate integration test if the DOCKER_HOST env var is set -->
-        <profile>
-            <id>testcontainers-spring-integration-tests-docker-env</id>
-            <activation>
-                <property>
-                    <name>env.DOCKER_HOST</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-failsafe-plugin</artifactId>
-                        <configuration>
-                            <skipTests>${skipTests}</skipTests>
-                            <systemPropertyVariables>
-                                
<visibleassertions.silence>true</visibleassertions.silence>
-                            </systemPropertyVariables>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-    </profiles>
 </project>
diff --git 
a/components/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
 
b/components/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
index 8522801..71cc760 100644
--- 
a/components/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
+++ 
b/components/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
@@ -26,8 +26,10 @@ import 
org.apache.camel.component.properties.PropertiesComponent;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.apache.camel.test.testcontainers.ContainerPropertiesFunction;
 import org.apache.camel.test.testcontainers.Containers;
+import org.junit.Assume;
 import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.containers.Network;
+import org.testcontainers.utility.DockerMachineClient;
 
 public abstract class ContainerAwareSpringTestSupport extends 
CamelSpringTestSupport {
     private List<GenericContainer<?>> containers = new 
CopyOnWriteArrayList<>();
@@ -38,6 +40,7 @@ public abstract class ContainerAwareSpringTestSupport extends 
CamelSpringTestSup
 
     @Override
     protected void setupResources() throws Exception {
+        Assume.assumeTrue("Skipping test because docker not installed", 
DockerMachineClient.instance().isInstalled());
         super.setupResources();
 
         containers.clear();

Reply via email to