<dependency>
<groupId>com.playtika.testcontainers</groupId>
<artifactId>embedded-clickhouse</artifactId>
<scope>test</scope>
</dependency>
-
embedded.clickhouse.enabled
(true|false, default is true)
-
embedded.clickhouse.reuseContainer
(true|false, default is false)
-
embedded.clickhouse.dockerImage
(default is 'clickhouse/clickhouse-server:24.12.1')
-
Image versions on dockerhub
-
-
embedded.clickhouse.user
(default is 'default')
-
embedded.clickhouse.password
(default is '')
-
embedded.clickhouse.initScriptPath
(default is null)
-
embedded.toxiproxy.proxies.clickhouse.enabled
Enables both creation of the container with ToxiProxy TCP proxy and a proxy to theembedded-clickhouse
container.
-
embedded.clickhouse.schema
-
embedded.clickhouse.host
-
embedded.clickhouse.port
-
embedded.clickhouse.user
-
embedded.clickhouse.password
-
embedded.clickhouse.toxiproxy.host
-
embedded.clickhouse.toxiproxy.port
-
embedded.clickhouse.networkAlias
-
embedded.clickhouse.internalPort
-
Bean
ToxiproxyContainer.ContainerProxy clickhouseContainerProxy
To auto-configure spring-jdbc
use these properties in your test application.properties
:
spring.datasource.driver-class-name=ru.yandex.clickhouse.ClickHouseDriver
spring.datasource.url=jdbc:clickhouse://${embedded.clickhouse.host}:${embedded.clickhouse.port}/${embedded.clickhouse.schema}
spring.datasource.username=${embedded.clickhouse.user}
spring.datasource.password=${embedded.clickhouse.password}