Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.32 KB

File metadata and controls

40 lines (30 loc) · 1.32 KB

Cassandra Module

Usage example

This example connects to the Cassandra cluster:

  1. Define a container:

    Container definition inside_block:container-definition

  2. Build a CqlSession:

    Building CqlSession inside_block:cql-session

  3. Define a container with custom cassandra.yaml located in a directory cassandra-auth-required-configuration:

    Running init script with required authentication inside_block:init-with-auth

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

=== "Gradle" groovy testImplementation "org.testcontainers:cassandra:{{latest_version}}"

=== "Maven" xml <dependency> <groupId>org.testcontainers</groupId> <artifactId>cassandra</artifactId> <version>{{latest_version}}</version> <scope>test</scope> </dependency>