Redis Testcontainers
A Testcontainers module providing RedisContainer, which runs Redis, an in-memory data store.
Dependencies
Add the module to your project.
-
Gradle
-
Maven
dependencies {
testImplementation "io.arconia:arconia-testcontainers-redis"
}
<dependency>
<groupId>io.arconia</groupId>
<artifactId>arconia-testcontainers-redis</artifactId>
<scope>test</scope>
</dependency>
Usage
var redis = new RedisContainer(DockerImageName.parse("redis:latest"));
redis.start();
Redis accepts connections at getRedisUrl(), or on the port returned by getRedisPort().
| In Spring Boot applications, the Redis Dev Service runs this container with no code and connects the application to it. |