[Feature]: KiviDB module

Open
#4,090 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
66/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, go, redis
Domain
testing

Research direction

Read the module guide and compare modules/valkey with modules/redis/examples; use modulegen as described in the issue. Implement the KiviDB module with the specified port, wait conditions, command, options, and connection helpers, then add driver-free raw RESP parent tests and nested go-redis examples. Done means the module and examples build and the documented behavior works with the specified image.

Written by the indexing model from the issue text.

Description

Problem

There is no module for KiviDB (https://kividb.io), a Redis-compatible
in-memory database (RESP2/RESP3, AGPL-3.0, source at
https://github.com/kividbio/kividb). The redis and valkey modules do not
fit its image: KiviDB listens on 6380, not 6379; it logs
Ready to accept connections on <addr> rather than Redis's
* Ready to accept connections; the image is distroless (no shell, no
redis-cli), so exec-based checks cannot run; and any command of your own
replaces the image's --protected-mode no, after which clients from outside
the container are refused.

Solution

A kividb module created with modulegen, following the module guide:
Run(ctx, img, opts...) returning *Container; port 6380; wait for the
port (host side only, since there is no shell) and the ready log line;
--protected-mode no kept in the command; options WithPassword,
WithLogLevel, WithConfigFile; ConnectionString (with the password when
set) and Password. Parent tests are driver-free (raw RESP, as in
modules/valkey); go-redis examples go in a nested examples module, as
in modules/redis/examples. Default image kividb/kividb:v1.2.0
(Docker Hub, amd64 + arm64; also ghcr.io/kividbio/kividb).

Benefit

KiviDB users get a ready container for integration tests without working
out the port, protected-mode and wait-strategy details above.

Alternatives

GenericContainer with a hand-written request; or the redis module with
the port, command and wait strategy all overridden. Or hosting the module
outside this repository and listing it in the community module registry.

Would you like to help contributing this feature?

Yes. We maintain KiviDB and would maintain the module; a module built with modulegen is ready, linted and tested (race detector, repeated runs, docs page built). Disclosure: I work on KiviDB.

Dominant language
Go
Stars
5k
Forks
660
Avg merge
3d 11h
Merged PRs (30d)
48

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testcontainers/testcontainers-go

All issues in testcontainers/testcontainers-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.