Skip to content

Commit d26088d

Browse files
committed
workaround dotty issue
1 parent c56eb0b commit d26088d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test-framework/scalatest/src/test/scala/com/dimafeng/testcontainers/integration/GenericContainerSpec.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.dimafeng.testcontainers.{ForAllTestContainer, GenericContainer}
66
import org.scalatest.flatspec.AnyFlatSpec
77
import org.testcontainers.containers.wait.strategy.Wait
88
import org.testcontainers.images.builder.ImageFromDockerfile
9+
import org.testcontainers.images.builder.traits.ClasspathTrait;
910

1011
import scala.io.Source
1112

@@ -23,7 +24,8 @@ class GenericContainerSpec extends AnyFlatSpec with ForAllTestContainer {
2324
}
2425

2526
class GenericContainerDockerFileSpec extends GenericContainerSpec {
26-
private val imageFromDockerfile = new ImageFromDockerfile().withFileFromClasspath("Dockerfile", "generic-container-dockerfile")
27+
// we can't do this in Scala 3 due to https://github.com/lampepfl/dotty/issues/12586 so this is delegated to a small Java class.
28+
private val imageFromDockerfile = new JavaStub().imageFromDockerFileWithFileFromClasspath("Dockerfile", "generic-container-dockerfile")
2729
override val container: GenericContainer = GenericContainer(imageFromDockerfile,
2830
exposedPorts = Seq(80),
2931
waitStrategy = Wait.forHttp("/")

0 commit comments

Comments
 (0)