palantir / docker-compose-rule

A JUnit rule to manage docker containers using docker-compose
Apache License 2.0
424 stars 91 forks source link

TestContainers? #181

Open bsideup opened 7 years ago

bsideup commented 7 years ago

Hi!

Have you seen http://github.com/testcontainers/testcontainers-java ? :)

I'm co-maintainer of it and TestContainers is a bit more generic compared to docker-compose-rule. However, our current Docker Compose support is less powerful.

Maybe we can collaborate? :)

TestContainers comes with a really powerful environment detection (i.e. it can start docker machine for you, works with Docker for Windows/Mac, even works when being executed in a container itself :) )

Our community is very active, and we have a couple of big users like ZeroTurnaround, OpenZipkin, a few Apache projects.

hpryce commented 7 years ago

Hi,

I have to admit the last I looked at it was back when we started this project internally, two summers ago and it didn't have Docker Compose support at the time. Clearly that has changed - and I'm definitely open to collaborating rather than having two very similar libraries.

I'm going to take a closer look at the project and circle up with some of the other regular contributors to this library and will update sometime next week with our thoughts.

bsideup commented 7 years ago

:+1: great, thanks :) Your library is cool, and It would be awesome to collaborate and delegate (entirely or partially) Compose stuff to your team while we take care of other things like environment detection.

A lot of stuff changed in TestContainers since then, a lot of features and new environments were added, and now we're trying to build a foundation on top of it for JVM+Docker testing by inviting other similar projects to collaborate :)

bsideup commented 7 years ago

FYI your current immutable approach is something we were planning to introduce in TestContainers 2.0, would be cool to learn from docker-compose-rule's experience :)

bsideup commented 7 years ago

Hey @hpryce,

How is it going? :)

vesteraas commented 6 years ago

Today, I rewrote all my tests using Docker Compose Rule, to use TestContainers. The transition was very easy.

dotCipher commented 6 years ago

@bsideup, thanks for flagging this to us! Apologies on the super delayed response but I spoke with a few of the other maintainers (@hpryce / @alicederyn / @fryz) and we all agree that it might be worth investigating a way forward for collaboration.

For context, the DCR project has a few more maintainers (myself included) to support the growing demand, but we are in a slight holding pattern as we determine the overall direction we want to take this project. As @hpryce pointed out though, we built this project with the intent that it would fill a need internally that TestContainers wasn't able to fill originally. Since TestContainers now does have the functionality gap we were originally trying to meet, we would be open to seeing a way forward together.

There were some features we were planning on building out for the 1.0 release of DCR, and if we were to collaborate, we would like to try and incorporate those features into the core TestContainers project. We would be more than happy to iterate on adding the features that we would want into TestContainers ourselves if TestContainers doesn't already have them (things like JUnit5 functionality, Windows + cross-platform support, programmatic Container / Cluster waits, breaking up core docker-compose functionality into gradle subprojects, etc).

Does that all make sense? How would you like to proceed?

bsideup commented 6 years ago

Hi @dotCipher! Wow, great news :)

the features that we would want into TestContainers ourselves if TestContainers doesn't already have them

We're more than happy to to receive such contributions since DCR definitely has a great experience with Docker Compose!
Also, recently we received a couple of contributions which add programmatic Container / Cluster waits to our Docker Compose (DC) support to align it with GenericContainer's waits we already had for quite some time.

Windows support is something we already have, and we even implemented an experimental npipe support (thanks to opt-inable OkHttp transport) in 1.8.0 release. Our long term is to replace Netty with OkHttp to reduce the dependencies of the project.

Also worth mentioning that 1.8.0 also adds framework-agnostic lifecycle to simplify the integration with JUnit 5 and others. There is also a WIP pull request with experimental JUnit 5 support: https://github.com/testcontainers/testcontainers-java/pull/636 When JUnit's Sam Brannen was in Berlin we quickly chatted about it, and even came up with some ideas how to improve it. We would highly appreciate your feedback on it!

I've created a #docker-compose channel in our Slack ( http://slack.testcontainers.org/ ) and kindly invite you to join, so that we can coordinate the collaboration and define the scopes.

Looking forward to the results of our collaboration 💪