Skip to content

Commit

Permalink
Merge pull request #1 from arendsyl/master
Browse files Browse the repository at this point in the history
Bump project to Scala 3 with updated libs
  • Loading branch information
P4ndaFR authored Feb 7, 2024
2 parents 99c7fba + 9f8306d commit 41f2072
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
31 changes: 16 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@

lazy val testContainersScalaVersion = "0.40.11"
lazy val testContainersScalaVersion = "0.41.0"
lazy val testContainersWarp10Version = "1.0.6"
lazy val akkaVersion = "2.6.20"
lazy val akkaVersion = "2.8.0"

ThisBuild / semanticdbVersion := "4.8.14"

credentials += Credentials("GnuPG Key ID", "gpg", "B11C53C05D413713BDD3660FA7B8F38C536F1DF2", "ignored")

lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.clever-cloud",
scalaVersion := "2.13.10",
version := "2.0.2",
)),
organization := "com.clever-cloud",
scalaVersion := "2.13.11",
version := "2.1.0",
crossScalaVersions := Seq(scalaVersion.value, "3.3.1"),
name := "testcontainers-scala-warp10",
licenses := List("MIT" -> new URL("https://mit-license.org/")),
homepage := Some(url("https://github.com/CleverCloud/testcontainers-scala-warp10")),
resolvers += Resolver.mavenLocal,
resolvers += Resolver.mavenCentral,
libraryDependencies ++= Seq(
"com.dimafeng" %% "testcontainers-scala-core" % testContainersScalaVersion,
"com.clever-cloud" % "testcontainers-warp10" % testContainersWarp10Version,

"net.java.dev.jna" % "jna" % "5.12.1" % Test,
"org.scalatest" %% "scalatest" % "3.2.14" % Test,
"com.typesafe.akka" %% "akka-protobuf-v3" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-stream-typed" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-stream" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test,
"org.scalatest" %% "scalatest" % "3.2.15" % Test,
("com.typesafe.akka" %% "akka-protobuf-v3" % akkaVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-stream-typed" % akkaVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-stream" % akkaVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test).cross(CrossVersion.for3Use2_13),
"com.dimafeng" %% "testcontainers-scala-scalatest" % testContainersScalaVersion % Test,
"org.slf4j" % "slf4j-jdk14" % "1.7.25" % Test,
"io.moia" %% "scala-http-client" % "5.1.0" % Test,
"org.slf4j" % "slf4j-jdk14" % "2.0.5" % Test,
("io.moia" %% "scala-http-client" % "5.2.0" % Test).cross(CrossVersion.for3Use2_13)
),
publishMavenStyle := true,
Test / publishArtifact := false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package com.clevercloud.testcontainers.scala

import akka.http.scaladsl.model.{HttpEntity, HttpMethods}
import akka.http.scaladsl.model.{ HttpEntity, HttpMethods }
import akka.actor.testkit.typed.scaladsl.ActorTestKit
import akka.actor.typed.ActorSystem
import akka.http.scaladsl.model.headers.RawHeader
import akka.http.scaladsl.unmarshalling.Unmarshal
import io.moia.scalaHttpClient._
import org.scalatest.concurrent.Eventually
import org.scalatest.matchers.should.Matchers
import org.scalatest.time.{Milliseconds, Seconds, Span}
import org.scalatest.time.{ Milliseconds, Seconds, Span }
import org.scalatest.wordspec.AnyWordSpec
import com.dimafeng.testcontainers.ForAllTestContainer

import java.time.Clock
import scala.concurrent.{Await, Future}
import scala.concurrent.duration.{Deadline, DurationInt}
import scala.concurrent.{ Await, ExecutionContextExecutor, Future }
import scala.concurrent.duration.{ Deadline, DurationInt }


class Warp10ContainerSpecs extends AnyWordSpec
Expand All @@ -30,12 +31,12 @@ class Warp10ContainerSpecs extends AnyWordSpec
private val Warp10UpdateAPI = "/api/v0/update"
private val Warp10Version = "2.7.5"

val container = Warp10Container(Warp10Version)
val container: Warp10Container = Warp10Container(Warp10Version)

private val testKit = ActorTestKit()

implicit val system = testKit.system
implicit val ec = system.executionContext
implicit val system: ActorSystem[Nothing] = testKit.system
implicit val ec : ExecutionContextExecutor = system.executionContext

"warp10 testcontainer" should {
"give write token" in {
Expand All @@ -54,12 +55,13 @@ class Warp10ContainerSpecs extends AnyWordSpec
content.status.isSuccess() shouldBe (true)
content.headers.find(_.lowercaseName() == Warp10FetchedHeader.toLowerCase()).map(_.value().toInt).getOrElse(0) shouldBe (1)
case _ =>
"error" shouldBe (false)
assert(false)
}
case DomainError(content) =>
Unmarshal(content).to[String] shouldBe (false)
val result = Await.result(Unmarshal(content).to[String], 10.seconds)
assert(false, result)
case _ =>
"error" shouldBe (false)
assert(false)
}
}
}
Expand Down

0 comments on commit 41f2072

Please sign in to comment.