You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Luca Burgazzoli <lb...@gmail.com> on 2018/05/22 15:35:02 UTC

testcontainers

Hi all,

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.

Any objection/suggestion ?

Regards,
Luca

[1] https://www.testcontainers.org/


---
Luca Burgazzoli

R: testcontainers

Posted by Andrea Cosentino <an...@yahoo.com.INVALID>.
Great idea! +1
 
 
  Il mar, 22 mag, 2018 alle 17:35, Luca Burgazzoli<lb...@gmail.com> ha scritto:   Hi all,

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.

Any objection/suggestion ?

Regards,
Luca

[1] https://www.testcontainers.org/


---
Luca Burgazzoli
  

Re: testcontainers

Posted by Luca Burgazzoli <lb...@gmail.com>.
Of course, any image available on docker hub (or other registries) can be used.

---
Luca Burgazzoli


On Wed, May 23, 2018 at 11:16 PM, Alex Dettinger <al...@gmail.com> wrote:
> Hi Luca,
>
>   +1 as you demonstrated the use to test starters.
>
>   I already faced a situation where a custom docker image would have helped
> in testing a regular camel component.
> Would it be in the scope of camel-testcontainers ? I mean building a custom
> image, pushing it to docker hub and use that for route level tests of a
> regular component ?
>
> Alex
>
>
>
> On Wed, May 23, 2018 at 9:39 AM, Luca Burgazzoli <lb...@gmail.com>
> wrote:
>
>> Like:
>>
>>     https://github.com/lburgazzoli/apache-camel/blob/
>> CAMEL-12485/platforms/spring-boot/components-starter/camel-
>> consul-starter/pom.xml#L67-L128
>>
>>
>> ---
>> Luca Burgazzoli
>>
>>
>> On Wed, May 23, 2018 at 9:38 AM, Luca Burgazzoli <lb...@gmail.com>
>> wrote:
>> > It can be done by checking the presence of the docker socket file or
>> > DOCKER_HOST env var
>> >
>> > ---
>> > Luca Burgazzoli
>> >
>> >
>> > On Wed, May 23, 2018 at 8:56 AM, Willem Jiang <wi...@gmail.com>
>> wrote:
>> >> Hi Luca,
>> >>
>> >> I guess you mean the maven profile. Please correct me if I'm wrong.
>> >> Currently I need to user -Pdocker to enable the docker related test in
>> my
>> >> project.
>> >>
>> >> I'm not sure if we enable the profile by default if there is a docker
>> >> command in the box.
>> >>
>> >>
>> >>
>> >> Willem Jiang
>> >>
>> >> Blog: http://willemjiang.blogspot.com (English)
>> >>           http://jnn.iteye.com  (Chinese)
>> >> Twitter: willemjiang
>> >> Weibo: 姜宁willem
>> >>
>> >> On Wed, May 23, 2018 at 2:22 PM, Luca Burgazzoli <lburgazzoli@gmail.com
>> >
>> >> wrote:
>> >>
>> >>> Hi Zoran,
>> >>>
>> >>> On Tue, May 22, 2018 at 10:03 PM, Zoran Regvart <zo...@regvart.com>
>> wrote:
>> >>> > Hi Luca,
>> >>> > sounds like a good idea, would be really good if we transitioned (no
>> >>> > need for a big bang), to JUnit 5 then we could use conditional logic
>> >>> > to skip those tests if for instance docker is not available.
>> >>> >
>> >>> > I would also consider marking those as integration tests so they are
>> >>> > run only if we want them to be run, or in environments that we know
>> >>> > they'll run without issues.
>> >>> >
>> >>>
>> >>> As first iteration I'd use profiles, junit 5 is not exatly as easy as
>> >>> junit 4 is.
>> >>>
>> >>> > zoran
>> >>> >
>> >>> > On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <
>> lburgazzoli@gmail.com>
>> >>> wrote:
>> >>> >> Hi all,
>> >>> >>
>> >>> >> 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.
>> >>> >>
>> >>> >> Any objection/suggestion ?
>> >>> >>
>> >>> >> Regards,
>> >>> >> Luca
>> >>> >>
>> >>> >> [1] https://www.testcontainers.org/
>> >>> >>
>> >>> >>
>> >>> >> ---
>> >>> >> Luca Burgazzoli
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Zoran Regvart
>> >>>
>>

Re: testcontainers

Posted by Alex Dettinger <al...@gmail.com>.
Hi Luca,

  +1 as you demonstrated the use to test starters.

  I already faced a situation where a custom docker image would have helped
in testing a regular camel component.
Would it be in the scope of camel-testcontainers ? I mean building a custom
image, pushing it to docker hub and use that for route level tests of a
regular component ?

Alex



On Wed, May 23, 2018 at 9:39 AM, Luca Burgazzoli <lb...@gmail.com>
wrote:

> Like:
>
>     https://github.com/lburgazzoli/apache-camel/blob/
> CAMEL-12485/platforms/spring-boot/components-starter/camel-
> consul-starter/pom.xml#L67-L128
>
>
> ---
> Luca Burgazzoli
>
>
> On Wed, May 23, 2018 at 9:38 AM, Luca Burgazzoli <lb...@gmail.com>
> wrote:
> > It can be done by checking the presence of the docker socket file or
> > DOCKER_HOST env var
> >
> > ---
> > Luca Burgazzoli
> >
> >
> > On Wed, May 23, 2018 at 8:56 AM, Willem Jiang <wi...@gmail.com>
> wrote:
> >> Hi Luca,
> >>
> >> I guess you mean the maven profile. Please correct me if I'm wrong.
> >> Currently I need to user -Pdocker to enable the docker related test in
> my
> >> project.
> >>
> >> I'm not sure if we enable the profile by default if there is a docker
> >> command in the box.
> >>
> >>
> >>
> >> Willem Jiang
> >>
> >> Blog: http://willemjiang.blogspot.com (English)
> >>           http://jnn.iteye.com  (Chinese)
> >> Twitter: willemjiang
> >> Weibo: 姜宁willem
> >>
> >> On Wed, May 23, 2018 at 2:22 PM, Luca Burgazzoli <lburgazzoli@gmail.com
> >
> >> wrote:
> >>
> >>> Hi Zoran,
> >>>
> >>> On Tue, May 22, 2018 at 10:03 PM, Zoran Regvart <zo...@regvart.com>
> wrote:
> >>> > Hi Luca,
> >>> > sounds like a good idea, would be really good if we transitioned (no
> >>> > need for a big bang), to JUnit 5 then we could use conditional logic
> >>> > to skip those tests if for instance docker is not available.
> >>> >
> >>> > I would also consider marking those as integration tests so they are
> >>> > run only if we want them to be run, or in environments that we know
> >>> > they'll run without issues.
> >>> >
> >>>
> >>> As first iteration I'd use profiles, junit 5 is not exatly as easy as
> >>> junit 4 is.
> >>>
> >>> > zoran
> >>> >
> >>> > On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <
> lburgazzoli@gmail.com>
> >>> wrote:
> >>> >> Hi all,
> >>> >>
> >>> >> 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.
> >>> >>
> >>> >> Any objection/suggestion ?
> >>> >>
> >>> >> Regards,
> >>> >> Luca
> >>> >>
> >>> >> [1] https://www.testcontainers.org/
> >>> >>
> >>> >>
> >>> >> ---
> >>> >> Luca Burgazzoli
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Zoran Regvart
> >>>
>

Re: testcontainers

Posted by Luca Burgazzoli <lb...@gmail.com>.
Like:

    https://github.com/lburgazzoli/apache-camel/blob/CAMEL-12485/platforms/spring-boot/components-starter/camel-consul-starter/pom.xml#L67-L128


---
Luca Burgazzoli


On Wed, May 23, 2018 at 9:38 AM, Luca Burgazzoli <lb...@gmail.com> wrote:
> It can be done by checking the presence of the docker socket file or
> DOCKER_HOST env var
>
> ---
> Luca Burgazzoli
>
>
> On Wed, May 23, 2018 at 8:56 AM, Willem Jiang <wi...@gmail.com> wrote:
>> Hi Luca,
>>
>> I guess you mean the maven profile. Please correct me if I'm wrong.
>> Currently I need to user -Pdocker to enable the docker related test in my
>> project.
>>
>> I'm not sure if we enable the profile by default if there is a docker
>> command in the box.
>>
>>
>>
>> Willem Jiang
>>
>> Blog: http://willemjiang.blogspot.com (English)
>>           http://jnn.iteye.com  (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Wed, May 23, 2018 at 2:22 PM, Luca Burgazzoli <lb...@gmail.com>
>> wrote:
>>
>>> Hi Zoran,
>>>
>>> On Tue, May 22, 2018 at 10:03 PM, Zoran Regvart <zo...@regvart.com> wrote:
>>> > Hi Luca,
>>> > sounds like a good idea, would be really good if we transitioned (no
>>> > need for a big bang), to JUnit 5 then we could use conditional logic
>>> > to skip those tests if for instance docker is not available.
>>> >
>>> > I would also consider marking those as integration tests so they are
>>> > run only if we want them to be run, or in environments that we know
>>> > they'll run without issues.
>>> >
>>>
>>> As first iteration I'd use profiles, junit 5 is not exatly as easy as
>>> junit 4 is.
>>>
>>> > zoran
>>> >
>>> > On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com>
>>> wrote:
>>> >> Hi all,
>>> >>
>>> >> 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.
>>> >>
>>> >> Any objection/suggestion ?
>>> >>
>>> >> Regards,
>>> >> Luca
>>> >>
>>> >> [1] https://www.testcontainers.org/
>>> >>
>>> >>
>>> >> ---
>>> >> Luca Burgazzoli
>>> >
>>> >
>>> >
>>> > --
>>> > Zoran Regvart
>>>

Re: testcontainers

Posted by Luca Burgazzoli <lb...@gmail.com>.
It can be done by checking the presence of the docker socket file or
DOCKER_HOST env var

---
Luca Burgazzoli


On Wed, May 23, 2018 at 8:56 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi Luca,
>
> I guess you mean the maven profile. Please correct me if I'm wrong.
> Currently I need to user -Pdocker to enable the docker related test in my
> project.
>
> I'm not sure if we enable the profile by default if there is a docker
> command in the box.
>
>
>
> Willem Jiang
>
> Blog: http://willemjiang.blogspot.com (English)
>           http://jnn.iteye.com  (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, May 23, 2018 at 2:22 PM, Luca Burgazzoli <lb...@gmail.com>
> wrote:
>
>> Hi Zoran,
>>
>> On Tue, May 22, 2018 at 10:03 PM, Zoran Regvart <zo...@regvart.com> wrote:
>> > Hi Luca,
>> > sounds like a good idea, would be really good if we transitioned (no
>> > need for a big bang), to JUnit 5 then we could use conditional logic
>> > to skip those tests if for instance docker is not available.
>> >
>> > I would also consider marking those as integration tests so they are
>> > run only if we want them to be run, or in environments that we know
>> > they'll run without issues.
>> >
>>
>> As first iteration I'd use profiles, junit 5 is not exatly as easy as
>> junit 4 is.
>>
>> > zoran
>> >
>> > On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com>
>> wrote:
>> >> Hi all,
>> >>
>> >> 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.
>> >>
>> >> Any objection/suggestion ?
>> >>
>> >> Regards,
>> >> Luca
>> >>
>> >> [1] https://www.testcontainers.org/
>> >>
>> >>
>> >> ---
>> >> Luca Burgazzoli
>> >
>> >
>> >
>> > --
>> > Zoran Regvart
>>

Re: testcontainers

Posted by Willem Jiang <wi...@gmail.com>.
Hi Luca,

I guess you mean the maven profile. Please correct me if I'm wrong.
Currently I need to user -Pdocker to enable the docker related test in my
project.

I'm not sure if we enable the profile by default if there is a docker
command in the box.



Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem

On Wed, May 23, 2018 at 2:22 PM, Luca Burgazzoli <lb...@gmail.com>
wrote:

> Hi Zoran,
>
> On Tue, May 22, 2018 at 10:03 PM, Zoran Regvart <zo...@regvart.com> wrote:
> > Hi Luca,
> > sounds like a good idea, would be really good if we transitioned (no
> > need for a big bang), to JUnit 5 then we could use conditional logic
> > to skip those tests if for instance docker is not available.
> >
> > I would also consider marking those as integration tests so they are
> > run only if we want them to be run, or in environments that we know
> > they'll run without issues.
> >
>
> As first iteration I'd use profiles, junit 5 is not exatly as easy as
> junit 4 is.
>
> > zoran
> >
> > On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com>
> wrote:
> >> Hi all,
> >>
> >> 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.
> >>
> >> Any objection/suggestion ?
> >>
> >> Regards,
> >> Luca
> >>
> >> [1] https://www.testcontainers.org/
> >>
> >>
> >> ---
> >> Luca Burgazzoli
> >
> >
> >
> > --
> > Zoran Regvart
>

Re: testcontainers

Posted by Luca Burgazzoli <lb...@gmail.com>.
Hi Zoran,

On Tue, May 22, 2018 at 10:03 PM, Zoran Regvart <zo...@regvart.com> wrote:
> Hi Luca,
> sounds like a good idea, would be really good if we transitioned (no
> need for a big bang), to JUnit 5 then we could use conditional logic
> to skip those tests if for instance docker is not available.
>
> I would also consider marking those as integration tests so they are
> run only if we want them to be run, or in environments that we know
> they'll run without issues.
>

As first iteration I'd use profiles, junit 5 is not exatly as easy as
junit 4 is.

> zoran
>
> On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com> wrote:
>> Hi all,
>>
>> 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.
>>
>> Any objection/suggestion ?
>>
>> Regards,
>> Luca
>>
>> [1] https://www.testcontainers.org/
>>
>>
>> ---
>> Luca Burgazzoli
>
>
>
> --
> Zoran Regvart

Re: testcontainers

Posted by Onder SEZGIN <on...@gmail.com>.
+1

On Wed, May 23, 2018 at 8:14 AM, Luca Burgazzoli <lb...@gmail.com>
wrote:

> A very simple example is:
>
>     https://github.com/lburgazzoli/apache-camel/blob/
> CAMEL-12485/platforms/spring-boot/components-starter/camel-
> consul-starter/src/test/java/org/apache/camel/component/
> consul/springboot/cloud/ConsulServiceRegistryIT.java#L45
>
> There is then some code used to customize logging and to wait for the
> container to start up which I'd like to move to a common test
> component and if would be nice to have some methods in a new
> "ContainerizedCameltestSupport" class to overload to easily customize
> container's behavior.
>
> ---
> Luca Burgazzoli
>
>
> On Wed, May 23, 2018 at 12:35 AM, Willem Jiang <wi...@gmail.com>
> wrote:
> > Hi
> >
> > I just go through the test container introduction,
> > it's cool that we can start the container in the Java unit test.
> >
> > @Luca
> > Could you provide a typic use case(with code) of using
> camel-testcontainers?
> > Normally, we just need to spin up the service image for the testing, I
> > think testcontainer already provide a good API for it.
> >
> > @Zoran,
> > I think we don't need to change all the Unit test to JUnit5 at one time.
> > We can just start to use JUnit5 with the  camel integration test first.
> >
> >
> >
> > Willem Jiang
> >
> > Blog: http://willemjiang.blogspot.com (English)
> >           http://jnn.iteye.com  (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, May 23, 2018 at 4:03 AM, Zoran Regvart <zo...@regvart.com>
> wrote:
> >
> >> Hi Luca,
> >> sounds like a good idea, would be really good if we transitioned (no
> >> need for a big bang), to JUnit 5 then we could use conditional logic
> >> to skip those tests if for instance docker is not available.
> >>
> >> I would also consider marking those as integration tests so they are
> >> run only if we want them to be run, or in environments that we know
> >> they'll run without issues.
> >>
> >> zoran
> >>
> >> On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lburgazzoli@gmail.com
> >
> >> wrote:
> >> > Hi all,
> >> >
> >> > 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.
> >> >
> >> > Any objection/suggestion ?
> >> >
> >> > Regards,
> >> > Luca
> >> >
> >> > [1] https://www.testcontainers.org/
> >> >
> >> >
> >> > ---
> >> > Luca Burgazzoli
> >>
> >>
> >>
> >> --
> >> Zoran Regvart
> >>
>

Re: testcontainers

Posted by Luca Burgazzoli <lb...@gmail.com>.
A very simple example is:

    https://github.com/lburgazzoli/apache-camel/blob/CAMEL-12485/platforms/spring-boot/components-starter/camel-consul-starter/src/test/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryIT.java#L45

There is then some code used to customize logging and to wait for the
container to start up which I'd like to move to a common test
component and if would be nice to have some methods in a new
"ContainerizedCameltestSupport" class to overload to easily customize
container's behavior.

---
Luca Burgazzoli


On Wed, May 23, 2018 at 12:35 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi
>
> I just go through the test container introduction,
> it's cool that we can start the container in the Java unit test.
>
> @Luca
> Could you provide a typic use case(with code) of using camel-testcontainers?
> Normally, we just need to spin up the service image for the testing, I
> think testcontainer already provide a good API for it.
>
> @Zoran,
> I think we don't need to change all the Unit test to JUnit5 at one time.
> We can just start to use JUnit5 with the  camel integration test first.
>
>
>
> Willem Jiang
>
> Blog: http://willemjiang.blogspot.com (English)
>           http://jnn.iteye.com  (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, May 23, 2018 at 4:03 AM, Zoran Regvart <zo...@regvart.com> wrote:
>
>> Hi Luca,
>> sounds like a good idea, would be really good if we transitioned (no
>> need for a big bang), to JUnit 5 then we could use conditional logic
>> to skip those tests if for instance docker is not available.
>>
>> I would also consider marking those as integration tests so they are
>> run only if we want them to be run, or in environments that we know
>> they'll run without issues.
>>
>> zoran
>>
>> On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com>
>> wrote:
>> > Hi all,
>> >
>> > 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.
>> >
>> > Any objection/suggestion ?
>> >
>> > Regards,
>> > Luca
>> >
>> > [1] https://www.testcontainers.org/
>> >
>> >
>> > ---
>> > Luca Burgazzoli
>>
>>
>>
>> --
>> Zoran Regvart
>>

Re: testcontainers

Posted by Willem Jiang <wi...@gmail.com>.
Hi

I just go through the test container introduction,
it's cool that we can start the container in the Java unit test.

@Luca
Could you provide a typic use case(with code) of using camel-testcontainers?
Normally, we just need to spin up the service image for the testing, I
think testcontainer already provide a good API for it.

@Zoran,
I think we don't need to change all the Unit test to JUnit5 at one time.
We can just start to use JUnit5 with the  camel integration test first.



Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem

On Wed, May 23, 2018 at 4:03 AM, Zoran Regvart <zo...@regvart.com> wrote:

> Hi Luca,
> sounds like a good idea, would be really good if we transitioned (no
> need for a big bang), to JUnit 5 then we could use conditional logic
> to skip those tests if for instance docker is not available.
>
> I would also consider marking those as integration tests so they are
> run only if we want them to be run, or in environments that we know
> they'll run without issues.
>
> zoran
>
> On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com>
> wrote:
> > Hi all,
> >
> > 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.
> >
> > Any objection/suggestion ?
> >
> > Regards,
> > Luca
> >
> > [1] https://www.testcontainers.org/
> >
> >
> > ---
> > Luca Burgazzoli
>
>
>
> --
> Zoran Regvart
>

Re: testcontainers

Posted by Zoran Regvart <zo...@regvart.com>.
Hi Luca,
sounds like a good idea, would be really good if we transitioned (no
need for a big bang), to JUnit 5 then we could use conditional logic
to skip those tests if for instance docker is not available.

I would also consider marking those as integration tests so they are
run only if we want them to be run, or in environments that we know
they'll run without issues.

zoran

On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com> wrote:
> Hi all,
>
> 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.
>
> Any objection/suggestion ?
>
> Regards,
> Luca
>
> [1] https://www.testcontainers.org/
>
>
> ---
> Luca Burgazzoli



-- 
Zoran Regvart

Re: testcontainers

Posted by Luca Burgazzoli <lb...@gmail.com>.
Yes test only, sometimes you do not have a java test framework to spin
up an instance of the target service you want to integrate so having
some support in camel to spin up a containerized service may be
useful. I used testcontainers to test etcd and consul and by spinning
up a container for the mentioned service is much easier that try to
mock every possible api.

---
Luca Burgazzoli


On Tue, May 22, 2018 at 6:06 PM, Paul Gale <pa...@gmail.com> wrote:
> Put another way - what is the problem that you're trying to solve? Just
> wondering.
>
> Thanks,
> Paul
>
> On Tue, May 22, 2018 at 12:05 PM, Paul Gale <pa...@gmail.com> wrote:
>
>> What would be some example use cases that illustrate the need to manage
>> containers using Camel in particular? Just testing only?
>>
>> Thanks,
>> Paul
>>
>> On Tue, May 22, 2018 at 11:35 AM, Luca Burgazzoli <lb...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> 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.
>>>
>>> Any objection/suggestion ?
>>>
>>> Regards,
>>> Luca
>>>
>>> [1] https://www.testcontainers.org/
>>>
>>>
>>> ---
>>> Luca Burgazzoli
>>>
>>
>>

Re: testcontainers

Posted by Paul Gale <pa...@gmail.com>.
Put another way - what is the problem that you're trying to solve? Just
wondering.

Thanks,
Paul

On Tue, May 22, 2018 at 12:05 PM, Paul Gale <pa...@gmail.com> wrote:

> What would be some example use cases that illustrate the need to manage
> containers using Camel in particular? Just testing only?
>
> Thanks,
> Paul
>
> On Tue, May 22, 2018 at 11:35 AM, Luca Burgazzoli <lb...@gmail.com>
> wrote:
>
>> Hi all,
>>
>> 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.
>>
>> Any objection/suggestion ?
>>
>> Regards,
>> Luca
>>
>> [1] https://www.testcontainers.org/
>>
>>
>> ---
>> Luca Burgazzoli
>>
>
>

Re: testcontainers

Posted by Paul Gale <pa...@gmail.com>.
What would be some example use cases that illustrate the need to manage
containers using Camel in particular? Just testing only?

Thanks,
Paul

On Tue, May 22, 2018 at 11:35 AM, Luca Burgazzoli <lb...@gmail.com>
wrote:

> Hi all,
>
> 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.
>
> Any objection/suggestion ?
>
> Regards,
> Luca
>
> [1] https://www.testcontainers.org/
>
>
> ---
> Luca Burgazzoli
>

Re: testcontainers

Posted by Claus Ibsen <cl...@gmail.com>.
+1

On Tue, May 22, 2018 at 5:35 PM, Luca Burgazzoli <lb...@gmail.com> wrote:
> Hi all,
>
> 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.
>
> Any objection/suggestion ?
>
> Regards,
> Luca
>
> [1] https://www.testcontainers.org/
>
>
> ---
> Luca Burgazzoli



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2