pom.xml
<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 set to 'yandex/clickhouse-server:20.5')
-
embedded.clickhouse.asCompatibleImage
(true|false, default is 'false')
-
embedded.clickhouse.schema
-
embedded.clickhouse.host
-
embedded.clickhouse.port
-
embedded.clickhouse.user
-
embedded.clickhouse.password
To auto-configure spring-jdbc
use these properties in your test application.properties
:
/src/test/resources/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}