Skip to content

Commit

Permalink
upgrade zio-testcontainers to support docker compose V2
Browse files Browse the repository at this point in the history
  • Loading branch information
maizy committed Aug 6, 2024
1 parent d62e461 commit 086334d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
38 changes: 19 additions & 19 deletions modules/redis-it/src/test/resources/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
version: "3.3"

services:
single-node-0:
single-node0:
image: bitnami/redis:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'

single-node-1:
single-node1:
image: bitnami/redis:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'

cluster-node-0:
cluster-node0:
image: bitnami/redis-cluster:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=cluster-node-0 cluster-node-1 cluster-node-2 cluster-node-3 cluster-node-4 cluster-node-5'
- 'REDIS_NODES=cluster-node0 cluster-node1 cluster-node2 cluster-node3 cluster-node4 cluster-node5'

cluster-node-1:
cluster-node1:
image: bitnami/redis-cluster:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=cluster-node-0 cluster-node-1 cluster-node-2 cluster-node-3 cluster-node-4 cluster-node-5'
- 'REDIS_NODES=cluster-node0 cluster-node1 cluster-node2 cluster-node3 cluster-node4 cluster-node5'

cluster-node-2:
cluster-node2:
image: bitnami/redis-cluster:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=cluster-node-0 cluster-node-1 cluster-node-2 cluster-node-3 cluster-node-4 cluster-node-5'
- 'REDIS_NODES=cluster-node0 cluster-node1 cluster-node2 cluster-node3 cluster-node4 cluster-node5'

cluster-node-3:
cluster-node3:
image: bitnami/redis-cluster:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=cluster-node-0 cluster-node-1 cluster-node-2 cluster-node-3 cluster-node-4 cluster-node-5'
- 'REDIS_NODES=cluster-node0 cluster-node1 cluster-node2 cluster-node3 cluster-node4 cluster-node5'

cluster-node-4:
cluster-node4:
image: bitnami/redis-cluster:7.2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=cluster-node-0 cluster-node-1 cluster-node-2 cluster-node-3 cluster-node-4 cluster-node-5'
- 'REDIS_NODES=cluster-node0 cluster-node1 cluster-node2 cluster-node3 cluster-node4 cluster-node5'

cluster-node-5:
cluster-node5:
image: bitnami/redis-cluster:7.2
depends_on:
- cluster-node-0
- cluster-node-1
- cluster-node-2
- cluster-node-3
- cluster-node-4
- cluster-node0
- cluster-node1
- cluster-node2
- cluster-node3
- cluster-node4
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_CLUSTER_REPLICAS=1'
- 'REDIS_NODES=cluster-node-0 cluster-node-1 cluster-node-2 cluster-node-3 cluster-node-4 cluster-node-5'
- 'REDIS_NODES=cluster-node0 cluster-node1 cluster-node2 cluster-node3 cluster-node4 cluster-node5'
- 'REDIS_CLUSTER_CREATOR=yes'
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait ClusterSpec extends IntegrationSpec {
ZIO
.foreach(0 to 5) { n =>
ZIO
.attempt(docker.getServiceHost(s"cluster-node-$n", port))
.attempt(docker.getServiceHost(s"cluster-node$n", port))
.map(host => RedisUri(s"$host:$port"))
}
.orDie
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ trait IntegrationSpec extends ZIOSpecDefault {

object IntegrationSpec {
final val ClusterExecutorUnsupported = "cluster executor not supported"
final val MasterNode = "cluster-node-5"
final val SingleNode0 = "single-node-0"
final val SingleNode1 = "single-node-1"
final val MasterNode = "cluster-node5"
final val SingleNode0 = "single-node0"
final val SingleNode1 = "single-node1"
}
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object Dependencies {
val ZioConfig = "4.0.2"
val ZioJson = "0.6.2"
val ZioSchema = "1.2.2"
val ZioTestContainers = "0.4.1"
val ZioTestContainers = "0.5.0"
}

lazy val Benchmarks =
Expand Down

0 comments on commit 086334d

Please sign in to comment.