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 1a1bf67  "CAMEL-13454:camel-testcontainers - Should build if no docker"
1a1bf67 is described below

commit 1a1bf6706b3305b46e468ab24ecbbde93ea54474
Author: Kodanda Ramu Kakarla <kkaka...@kkakarla.pnq.csb>
AuthorDate: Fri Jul 19 16:32:02 2019 +0530

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

diff --git a/components/camel-testcontainers/pom.xml 
b/components/camel-testcontainers/pom.xml
index c882cf5..0c1d933 100644
--- a/components/camel-testcontainers/pom.xml
+++ b/components/camel-testcontainers/pom.xml
@@ -75,85 +75,4 @@
 
     </dependencies>
 
-    <profiles>
-          <profile>
-            <id>testcontainers-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-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-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/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java
 
b/components/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java
index a2199f1..9f697ef 100644
--- 
a/components/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java
+++ 
b/components/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java
@@ -24,8 +24,10 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.properties.PropertiesComponent;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Assume;
 import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.containers.Network;
+import org.testcontainers.utility.DockerMachineClient;
 
 public class ContainerAwareTestSupport extends CamelTestSupport {
     private List<GenericContainer<?>> containers = new 
CopyOnWriteArrayList<>();
@@ -36,6 +38,7 @@ public class ContainerAwareTestSupport extends 
CamelTestSupport {
 
     @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