Skip to content

[Enhancement]: Add Redis Sentinel test container #1298

Open
@Alirexaa

Description

@Alirexaa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmoduleAn official Testcontainers module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions