<dependency>
<groupId>com.playtika.testcontainers</groupId>
<artifactId>embedded-cassandra</artifactId>
<scope>test</scope>
</dependency>
-
embedded.cassandra.enabled
(true|false, default is true)
-
embedded.cassandra.reuseContainer
(true|false, default is false)
-
embedded.cassandra.keyspace-name
(default is 'embedded')
-
embedded.cassandra.replication-factor
(default is '1')
-
embedded.cassandra.dockerImage
(default is 'cassandra:5.0')
-
Image versions on dockerhub
-
-
embedded.toxiproxy.proxies.cassandra.enabled
Enables both creation of the container with ToxiProxy TCP proxy and a proxy to theembedded-cassandra
container.
-
embedded.cassandra.host
-
embedded.cassandra.port
-
embedded.cassandra.datacenter
-
embedded.cassandra.keyspace-name
-
embedded.cassandra.toxiproxy.host
-
embedded.cassandra.toxiproxy.port
-
embedded.cassandra.networkAlias
-
embedded.cassandra.internalPort
-
Bean
ToxiproxyContainer.ContainerProxy cassandraContainerProxy
To configure spring-data-cassandra
use these properties in your test application.properties
:
spring.data.cassandra.keyspace-name=${embedded.cassandra.keyspace-name}
spring.data.cassandra.local-datacenter=${embedded.cassandra.datacenter}
spring.data.cassandra.contact-points=${embedded.cassandra.host}
spring.data.cassandra.port=${embedded.cassandra.port}
spring.data.cassandra.schema-action=CREATE_IF_NOT_EXISTS