TestcontainerEx.ScyllaContainer (testcontainer_ex v0.3.0)

Copy Markdown View Source

Provides functionality for creating and managing ScyllaDB container configurations.

ScyllaDB is a Cassandra-compatible NoSQL database. This container exposes port 9042 (CQL) by default and uses nodetool to wait for readiness.

Example

{:ok, container} = TestcontainerEx.start_container(ScyllaContainer.new())
port = ScyllaContainer.port(container)
host = TestcontainerEx.get_host(container)

Summary

Functions

Returns a host:port connection URI string.

Returns the default image name without tag.

Returns the default CQL port (9042).

Creates a new ScyllaContainer with default configuration.

Returns the mapped host port for the CQL port.

Sets the check image regex used to validate the image name.

Sets the container image (e.g. "scylladb/scylla:5.4").

Enables or disables container reuse.

Sets the wait timeout in milliseconds.

Types

t()

@type t() :: %TestcontainerEx.ScyllaContainer{
  check_image: term(),
  image: term(),
  reuse: term(),
  wait_timeout: term()
}

Functions

connection_uri(container)

@spec connection_uri(TestcontainerEx.Container.Config.t()) :: String.t()

Returns a host:port connection URI string.

default_image()

@spec default_image() :: String.t()

Returns the default image name without tag.

default_port()

@spec default_port() :: 9042

Returns the default CQL port (9042).

new()

@spec new() :: t()

Creates a new ScyllaContainer with default configuration.

port(container)

@spec port(TestcontainerEx.Container.Config.t()) :: integer() | nil

Returns the mapped host port for the CQL port.

with_check_image(config, check_image)

@spec with_check_image(t(), String.t() | Regex.t()) :: t()

Sets the check image regex used to validate the image name.

with_image(config, image)

@spec with_image(t(), String.t()) :: t()

Sets the container image (e.g. "scylladb/scylla:5.4").

with_reuse(config, reuse)

@spec with_reuse(t(), boolean()) :: t()

Enables or disables container reuse.

with_wait_timeout(config, timeout)

@spec with_wait_timeout(t(), pos_integer()) :: t()

Sets the wait timeout in milliseconds.