[
https://issues.apache.org/jira/browse/CAMEL-12534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16501679#comment-16501679
]
ASF GitHub Bot commented on CAMEL-12534:
----------------------------------------
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
----
> create camel-testcontainers
> ---------------------------
>
> Key: CAMEL-12534
> URL: https://issues.apache.org/jira/browse/CAMEL-12534
> Project: Camel
> Issue Type: New Feature
> Reporter: Luca Burgazzoli
> Assignee: Luca Burgazzoli
> Priority: Minor
> Fix For: 2.22.0
>
>
> I've been using testcontainers [1] for a while and I found it useful
> to test against non java services such as consul, etcd and so on so
> I'd like to create a camel-testcontainers "component" that includes
> some facilities like a dedicated test support that take care of
> starting/stopping containers.
> [1] https://www.testcontainers.org/
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)