0.9.13
Docker containers can now be declared as test dependencies / Resources in distage-testkit
:
object PostgresDocker extends ContainerDef {
val primaryPort: DockerPort = DockerPort.TCP(5432)
override def config: Config = {
ContainerConfig(
image = "library/postgres:latest",
ports = Seq(primaryPort),
reuse = true,
)
}
}
Dependencies can be declared between docker containers:
object DockerPlugin extends DockerContainerModule[zio.Task] with PluginDef {
// this container will start once `DynamoContainer` is up and running
make[PostgresDocker.Container].fromResource {
PostgresDocker.make[zio.Task]
.dependOnDocker(DynamoDocker)
}
}
Use in test:
class DBTest extends DistageBIOSpecScalatest[zio.IO] {
"postgres docker" should {
"respond to queries" in {
(doobie: Transactor[zio.Task], pg: PostgresDocker.Container) =>
doobie.trans.apply(sql"select 1")
}
}
}
fundamentals-reflection:
- Shade boopickle dependency (#737)
- Fix LightTypeTag bug resolve prefixes of annotated types
fundamentals-bio:
- Add BIOAsync.parTraverse, parTraverse_, parTraverseN_ (1ed31c1)
distage:
- Docker resources (#732) by @pshirshov
- Move CatsDIEffectModule from distage-model to distage-roles (07d3ddd)
- Add IdentityDIEffectModule (004af1c)
distage-testkit:
- distage-testkit: Run tests in parallel, add DIEffectAsync (499f765)
- distage-testkit: Configure test class-wide options in SpecConfig (ff9a801)