jackdaw.streams.mock

Mocks for testing kafka streams.

build-driver

(build-driver f)

collect

(collect streams-builder)
Collects the test results. The test driver returns a list of messages with
each message formatted like "key:value"

consume

(consume test-driver {:keys [topic-name key-serde value-serde]})

get-keyvals

(get-keyvals test-driver topic-config)

producer

(producer test-driver {:keys [topic-name key-serde value-serde]})

producer-record

(producer-record x)

publish

(publish test-driver topic-config k v)(publish test-driver topic-config time-ms k v)

send

(send topology topic-config key message)
Publishes message to a topic.

streams-builder

(streams-builder)(streams-builder streams-builder)
Creates a mock streams-builder.

streams-builder->test-driver

(streams-builder->test-driver streams-builder)

topic

(topic topic-name)
Helper to create a topic.