From 65410429ea25d3c28ae376fb57d4424a2f095570 Mon Sep 17 00:00:00 2001 From: "Ariel Shaqed (Scolnicov)" Date: Mon, 1 Aug 2022 12:52:00 +0300 Subject: [PATCH] Update testcontainers-scala version 1.0 is coming (it's already a release candidate), be ready for it. --- clients/spark/build.sbt | 3 +-- .../io/treeverse/jpebble/BlockParserSpec.scala | 17 +++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clients/spark/build.sbt b/clients/spark/build.sbt index 6d7c32fa2da..ad902c628fe 100644 --- a/clients/spark/build.sbt +++ b/clients/spark/build.sbt @@ -71,8 +71,7 @@ def generateCoreProject(buildType: BuildType) = "org.xerial.snappy" % "snappy-java" % "1.1.8.4", "org.scalactic" %% "scalactic" % "3.2.9", "org.scalatest" %% "scalatest" % "3.2.9" % "test", - "com.dimafeng" %% "testcontainers-scala-scalatest" % "0.39.11" % "test", - "com.dimafeng" %% "testcontainers-scala-munit" % "0.39.11" % "test", + "com.dimafeng" %% "testcontainers-scala-scalatest" % "0.40.10" % "test", "com.lihaoyi" %% "upickle" % "1.4.0" % "test", "com.lihaoyi" %% "os-lib" % "0.7.8" % "test" ), diff --git a/clients/spark/core/src/test/scala/io/treeverse/jpebble/BlockParserSpec.scala b/clients/spark/core/src/test/scala/io/treeverse/jpebble/BlockParserSpec.scala index bbc12e1f56f..cc66949c6e3 100644 --- a/clients/spark/core/src/test/scala/io/treeverse/jpebble/BlockParserSpec.scala +++ b/clients/spark/core/src/test/scala/io/treeverse/jpebble/BlockParserSpec.scala @@ -2,18 +2,20 @@ package io.treeverse.jpebble import org.scalatest._ import matchers.should._ +import org.scalatest.matchers.must.Matchers.contain +import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper import funspec._ + import com.dimafeng.testcontainers.{ForAllTestContainer, GenericContainer} +import com.dimafeng.testcontainers.GenericContainer.FileSystemBind +import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy +import org.testcontainers.containers.BindMode import java.io.File import java.nio.charset.StandardCharsets import org.apache.commons.io.IOUtils import scala.io.Source -import org.testcontainers.containers.BindMode -import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy -import org.scalatest.matchers.must.Matchers.contain -import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper class BlockReadableSpec extends AnyFunSpec with Matchers { @@ -301,13 +303,12 @@ class CountedIteratorSpec extends AnyFunSpec with Matchers { } class GolangContainerSpec extends AnyFunSpec with ForAllTestContainer { - override val container: GenericContainer = GenericContainer( "golang:1.16.2-alpine", classpathResourceMapping = Seq( - ("parser-test/sst_files_generator.go", "/local/sst_files_generator.go", BindMode.READ_WRITE), - ("parser-test/go.mod", "/local/go.mod", BindMode.READ_WRITE), - ("parser-test/go.sum", "/local/go.sum", BindMode.READ_WRITE) + FileSystemBind("parser-test/sst_files_generator.go", "/local/sst_files_generator.go", BindMode.READ_WRITE), + FileSystemBind("parser-test/go.mod", "/local/go.mod", BindMode.READ_WRITE), + FileSystemBind("parser-test/go.sum", "/local/go.sum", BindMode.READ_WRITE) ), command = Seq("/bin/sh", "-c",