pl.allegro.tech.servicemesh.envoycontrol.config.service.RedisContainer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of envoy-control-tests Show documentation
Show all versions of envoy-control-tests Show documentation
Production-ready Control Plane for Service Mesh based on Envoy Proxy.
package pl.allegro.tech.servicemesh.envoycontrol.config.service
import org.testcontainers.containers.Network
import org.testcontainers.containers.wait.strategy.Wait
import pl.allegro.tech.servicemesh.envoycontrol.config.testcontainers.GenericContainer
class RedisContainer: GenericContainer("redis:alpine"), ServiceContainer {
override fun configure() {
super.configure()
withExposedPorts(PORT)
withNetwork(Network.SHARED)
waitingFor(Wait.forListeningPort())
}
fun address(): String = "${ipAddress()}:$PORT"
override fun port() = PORT
companion object {
const val PORT = 6379
}
}