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

etcd launcher, by exec-ing instead of Testcontainers #361

Closed
vorburger opened this issue Aug 20, 2018 · 7 comments
Closed

etcd launcher, by exec-ing instead of Testcontainers #361

vorburger opened this issue Aug 20, 2018 · 7 comments

Comments

@vorburger
Copy link
Member

It can be useful for projects using this jetcd project to be able to start etcd server in their respective tests. And not just for tests, but possibly also to simplify at least development (but probably never production) set ups - think "embedded database" (à la Derby, h2, MariaDB4j & Co.).

The tests in this project use Testcontainers. Projects using jetcd could also use Testcontainers for above. For simple Windows users, or even Linux noobs without Docker installed, this could sometimes be a PITA.

An alternative is to just start jetcd via exec. I'm doing this over in my EtcdLauncher. (That as-is currently just assumes that one has done e.g. sudo dnf install etcd ... it's also imaginable to make native binaries available as dependencies, such as how e.g. MariaDB4j and similar projects for other databases do it.)

Would a contribution with such a Launcher, or perhaps even some work for a simple etcd launch API which can start it either via Testcontainers or via exec, be of interest to this project?

If so, would using (and having a dependency from a jetcd:launcher artifact to) https://github.com/vorburger/ch.vorburger.exec for such a feature be acceptable, or do you have any preference for another similar launcher utility?

@lburgazzoli
Copy link
Collaborator

lburgazzoli commented Aug 20, 2018 via email

@bsideup
Copy link

bsideup commented Sep 3, 2018

Hi @vorburger,

I'm a member of Testcontainers project and would really like to hear from you what kind of issues you had, especially on Windows :)
We want to make it painless and happy to collect any kind of feedback 👍

@vorburger
Copy link
Member Author

@bsideup nice to meet you. I have not had any particular issues with Testcontainers; it seems great!

It's just that if one were to use etcd as a data store in a project and had integration tests for it, and would require all (possibly many) developers to have Docker installed to be able to run TestContainers, that could raise the barrier to entry to another (not this jetcd) project. However I totally agree this is not a burning problem - this issue was more of an idea for the medium term.

To be honest, what really happened is that I wrote my EtcdLauncher using https://github.com/vorburger/ch.vorburger.exec/ BEFORE I first saw the Testcontainers utilities which are hidden inside this (jetc) project. So in #384 as a first step I'm proposing to better expose that! Perhaps I'll pick this idea up after (and based on / as an option of) that - later.

@cherrylzhao
Copy link

@vorburger
how about this issue going on, it is better to provide a mock EtcdLauncher framework for unit test

@vorburger
Copy link
Member Author

how about this issue going on, it is better to provide a mock EtcdLauncher framework for unit test

@cherrylzhao I don't currently have plans to work on this. But if you would you like to take this, go! 😄

not a burning problem - this issue was more of an idea for the medium term.

To avoid future confusion, let me close this (old) issue.

@vorburger
Copy link
Member Author

More FTR (I'm not still planning to implement this issue; of course others can) just FYI: TestContainers CAN some times be a little bit of a PITA... e.g. testcontainers/testcontainers-java#1356 and testcontainers/testcontainers-java#955.

@bsideup
Copy link

bsideup commented Apr 8, 2019

I'm sorry, but the PITA here is Docker and Docker's distribution, also Docker Compose (and we do not recommend using it, there are many more things on Docker Compose which really suck compared to generic containers, e.g. this: docker/compose#6636 ) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants