[
https://issues.apache.org/jira/browse/CAMEL-13454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16884692#comment-16884692
]
Jan Bednar commented on CAMEL-13454:
------------------------------------
IMHO the much better option would be dropping those two maven profiles and
manage it in the test as JUnit Assumption. You can add this as first statement
into ContainerAwareTestSupport#setupResources
{code:java}
Assume.assumeTrue("Skipping test because docker not installed",
DockerMachineClient.instance().isInstalled());{code}
and it should be enough.
If we want to stay with current maven approach, we would need to add next
activation for windows. Because env.DOCKER_HOST is not set out-of-box with
docker installer and also /var/run/docker.sock does not exists on windows.
Currently are tests always skipped on windows with docker installed.
> camel-testcontainers - Should build if no docker
> ------------------------------------------------
>
> Key: CAMEL-13454
> URL: https://issues.apache.org/jira/browse/CAMEL-13454
> Project: Camel
> Issue Type: Improvement
> Reporter: Claus Ibsen
> Assignee: Ramu
> Priority: Major
> Fix For: 3.0.0
>
> Attachments: pom.xml
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If you run mvn clean install then the following should still pass.
> [INFO] -------------------------------------------------------
> [INFO] T E S T S
> [INFO] -------------------------------------------------------
> [INFO] Running
> org.apache.camel.test.testcontainers.ContainerAwareTestSupportIT
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> 31.178 s <<< FAILURE! - in
> org.apache.camel.test.testcontainers.ContainerAwareTestSupportIT
> [ERROR]
> testPropertyPlaceholders(org.apache.camel.test.testcontainers.ContainerAwareTestSupportIT)
> Time elapsed: 30.805 s <<< ERROR!
> java.lang.IllegalStateException: Could not find a valid Docker environment.
> Please see logs and check configuration
> at
> org.apache.camel.test.testcontainers.ContainerAwareTestSupportIT.createContainer(ContainerAwareTestSupportIT.java:37)
> [INFO]
> [INFO] Results:
> [INFO]
> [ERROR] Errors:
> [ERROR]
> ContainerAwareTestSupportIT>CamelTestSupport.setUp:284->ContainerAwareTestSupport.setupResources:42->ContainerAwareTestSupport.createContainers:76->createContainer:37
> » IllegalState
> [INFO]
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> [INFO]
> [INFO]
> [INFO] --- maven-failsafe-plugin:2.22.1:verify (default) @
> camel-testcontainers ---
> [INFO]
> ------------------------------------------------------------------------
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)