testcontainers / testcontainers/testcontainers-dotnet

[Enhancement]: Add Redis Sentinel test container

Open
#1,298 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement module
Dominant language
C#
Stars
4.4k
Forks
357
Avg merge
14h 42m
Merged PRs (30d)
16

Description

To use Redis for high availability, we use Redis Sentinel and provide multiple Redis instances to configure master and slave. Redis Sentinel monitors the master instance and provides a connection to the slave when the master is unavailable.

in c# code we use ConnectionMultiplexer.SentinelConnect(sentinelConfig); to get connection for this setup.
And in our tests, we should use a sentinel connection instead of a standard connection.
Its quite complicate to configure a test container to spin up the Redis Sentinel connection and I think we should have an package for making developer life easier.

I already implemented this test container in my project, and it took me 1 day to configure (it was a lot of time, and it made me crazy).
I could send a PR for this package and save a lot of time for other developers.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reviewing the existing Redis test-container patterns and the C# SentinelConnect(sentinelConfig) entry point described in the issue. Define the expected multi-instance Sentinel setup, then add tests showing that a Sentinel connection works and handles master unavailability. Done means developers can use the package for Redis Sentinel-based tests without repeating the configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, redis
Domain
databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.