Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some suggestions and an alternative to Dockertest #35

Closed
ibrt opened this issue Mar 14, 2016 · 5 comments
Closed

Some suggestions and an alternative to Dockertest #35

ibrt opened this issue Mar 14, 2016 · 5 comments

Comments

@ibrt
Copy link
Contributor

ibrt commented Mar 14, 2016

Hi Aeneas, I'm opening an issue in absence of other ways to contact you :) I just wanted to let you know I have been working on an alternative approach to achieve the same function of this library, and published it at: https://github.com/ibrt/go-compose. I believe this approach is simpler and has few advantages (listed below), maybe it could be interesting for you to have a look and possibly borrow some ideas!

  • It uses a Docker Compose config, which is standard and supports all Docker options
  • It is smaller but actually more flexible
  • It pulls in way less dependencies
  • It completely delegates the Docker environment configuration to whoever runs the tests
  • It results in less Go code to start/stop containers (i.e. one call to start and one call to kill everything)

On the downside, it doesn't have any support for standard or predefined services. I am planning to add them in separate subpackages, so callers can actually import only the dependencies they need.

Best,
Ivan

@ibrt
Copy link
Contributor Author

ibrt commented Mar 14, 2016

Another small detail, rather than randomly picking a port with a PRNG, it can let Docker do it for you (which means there is no risk of collisions).

@aeneasr
Copy link
Member

aeneasr commented Mar 14, 2016

Hey looks cool! I like your idea of using docker compose to set up the environment. Really merges "production" and "testing" stages.

How do you get a container instance? Didn't find it in the tests / docs. Also would go-compose work with go-dockerclient as suggested in #11 ?

@ibrt
Copy link
Contributor Author

ibrt commented Mar 14, 2016

The Compose type has a Containers map in it, keys are container names, and
values are the corresponding container instances.

IIUC go-dockerclient doesn't support docker compose, which is why I didn't
use it :)

On Mon, Mar 14, 2016 at 2:38 PM, Aeneas notifications@github.com wrote:

Hey looks cool! I like your idea of using docker compose to set up the
environment. Really merges "production" and "testing" stages.

How do you get a container instance
https://godoc.org/github.com/ibrt/go-compose/compose#Container? Didn't
find it in the tests / docs. Also would go-compose work with
go-dockerclient as suggested in #11
#11 ?


Reply to this email directly or view it on GitHub
#35 (comment).

@aeneasr
Copy link
Member

aeneasr commented Mar 18, 2016

@sbani will take a look at this :)

@aeneasr
Copy link
Member

aeneasr commented May 17, 2016

this will work with #46

@aeneasr aeneasr closed this as completed May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants