GitHub user lburgazzoli opened a pull request:
https://github.com/apache/camel/pull/2362
CAMEL-12534: create camel-testcontainers
Initial bits of testcontainers integration with camel test suite.
### WHAT'S NEW
- two new modules:
- camel-testcontainers
- camel-testcontainers-spring
- two new test support class:
- ContainerAwareTestSupport
- ContainerAwareSpringTestSupport
- a new properties function is automatically added to the camel-context
while testing with ContainerAwareTestSupport and
ContainerAwareSpringTestSupport so you can use proeprty placeholders to get
some informations about the containers:
```xml
<consulServiceDiscovery
url="http://{{container:host:consul}}:{{container:port:8500@consul}}"/>
```
### NOTES
1. the life-cycle of the containers is bout to the camel context so I had
to change the way class resources are cleaned up so instead of using junit's
@AfterClass annotation there is a new reference counted based implementation,
see CamelTestSupport
2. consul related component have been migrated to camel-testcontainer and
camel-testcontainers-spring to validate the implementation
Any feedback is very velcome.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lburgazzoli/apache-camel CAMEL-12534
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/2362.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2362
----
commit 8577c78534005fd45aa20605fd79b4d6d2317ef4
Author: lburgazzoli <lburgazzoli@...>
Date: 2018-05-31T22:17:25Z
CAMEL-12534: create camel-testcontainers
----
---