testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
8.04k stars 1.66k forks source link

Clickhouse via MySQL protocol #3827

Open codepitbull opened 3 years ago

codepitbull commented 3 years ago

I would like to contribute an improevemnt for the clickhouse module but I am unsure how to package it.

Clickhouse supports 3 ways of connecting:

The current module supports:

I'd like to provide a PR supporting MySQL (already got it working) and maybe even PostgreSQL but I am unsure how to package this. The JdbcDatabaseContainer is tied to a specific driver (the one from yandex). Would you rather have individual containers for each one? have a highly configurable container covering all areas? Any example fdrom an existing module that comes to mind?

Cheers, Jochen

kiview commented 3 years ago

How big would this change be in practice? Would this basically only mean making DRIVER_CLASS_NAME configurable?

codepitbull commented 3 years ago

Hey, so I finally got around rpovding a PR (https://github.com/testcontainers/testcontainers-java/pull/4038) :) Sorry for the delay. The PR contains how I am currently using the container. Feel free to request any change you need, it's just what I use right now, I only added support for the different JDBC-drivers.

codepitbull commented 3 years ago

I updated the PR once more since you did some changes to the container in master.

Are you actually interested in this change or should I delete the PR?