Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testcontainers/testcontainers-scala
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.41.9
Choose a base ref
...
head repository: testcontainers/testcontainers-scala
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 8, 2023

  1. Use AWS auth dependency for LocalStack

    adamking committed Nov 8, 2023
    Copy the full SHA
    c717c4f View commit details

Commits on Mar 9, 2025

  1. Update Scala versions and Redpanda container image

    - Updated the workflow to use Scala 2.12.20, 2.13.16, and 3.3.5 for
    testing.
    - Updated the Redpanda container image
    - Upgraded the actions/cache to v4 in the GitHub workflow.
    greshny committed Mar 9, 2025
    Copy the full SHA
    2de70f2 View commit details

Commits on Mar 10, 2025

  1. add sbt/setup-sbt

    greshny committed Mar 10, 2025
    Copy the full SHA
    67f0130 View commit details
  2. Merge pull request #427 from greshny-forks/optimize-github-actions

    Update Scala versions and Redpanda container image
    dimafeng authored Mar 10, 2025
    Copy the full SHA
    9219a11 View commit details
  3. K3S Module

    greshny committed Mar 10, 2025
    Copy the full SHA
    d7c2027 View commit details

Commits on Mar 11, 2025

  1. Merge pull request #426 from greshny-forks/k3s-module

    K3S Module
    dimafeng authored Mar 11, 2025
    Copy the full SHA
    25bb12c View commit details

Commits on Mar 18, 2025

  1. Copy the full SHA
    31db2ed View commit details

Commits on Mar 26, 2025

  1. Merge pull request #433 from scala-steward/update/sbt-1.10.11

    Update sbt, scripted-plugin to 1.10.11
    dimafeng authored Mar 26, 2025
    Copy the full SHA
    750917a View commit details

Commits on Apr 22, 2025

  1. Update client to 1.14.0

    scala-steward committed Apr 22, 2025
    Copy the full SHA
    6a87b23 View commit details

Commits on May 6, 2025

  1. Copy the full SHA
    fef2054 View commit details

Commits on May 9, 2025

  1. Copy the full SHA
    20d6fac View commit details

Commits on May 16, 2025

  1. Copy the full SHA
    a901c3a View commit details

Commits on May 24, 2025

  1. Copy the full SHA
    df0b15e View commit details
  2. Copy the full SHA
    a97afbb View commit details

Commits on May 26, 2025

  1. Merge pull request #450 from scala-steward/update/sbt-1.11.0

    Update sbt, scripted-plugin to 1.11.0
    dimafeng authored May 26, 2025
    Copy the full SHA
    77552c2 View commit details
  2. Merge pull request #449 from scala-steward/update/sbt-ci-release-1.11.0

    Update sbt-ci-release to 1.11.0
    dimafeng authored May 26, 2025
    Copy the full SHA
    473e86f View commit details
  3. Merge pull request #443 from lukestephenson-zendesk/bump-test-containers

    Bump test containers to 1.20.6
    dimafeng authored May 26, 2025
    Copy the full SHA
    948c506 View commit details
  4. Merge pull request #446 from scala-steward/update/google-cloud-pubsub…

    …-1.139.4
    
    Update google-cloud-pubsub to 1.139.4
    dimafeng authored May 26, 2025
    Copy the full SHA
    c9ca1a6 View commit details
  5. Merge pull request #445 from scala-steward/update/scala3-library-3.3.6

    Update scala3-library to 3.3.6
    dimafeng authored May 26, 2025
    Copy the full SHA
    cc09edf View commit details
  6. Merge pull request #440 from scala-steward/update/client-1.14.0

    Update client to 1.14.0
    dimafeng authored May 26, 2025
    Copy the full SHA
    afd8671 View commit details
  7. Merge pull request #264 from AdamJKing/master

    Use AWS auth dependency for LocalStack
    dimafeng authored May 26, 2025
    Copy the full SHA
    48991a6 View commit details
  8. Automerge

    dimafeng authored May 26, 2025
    Copy the full SHA
    2c3fb18 View commit details
  9. Update auto-approve.yml

    dimafeng authored May 26, 2025
    Copy the full SHA
    dcde48d View commit details
  10. Copy the full SHA
    a4c36c3 View commit details
  11. Automerging fix

    dimafeng committed May 26, 2025
    Copy the full SHA
    35e7030 View commit details
  12. Merge pull request #452 from testcontainers/revert-264-master

    Revert "Use AWS auth dependency for LocalStack"
    dimafeng authored May 26, 2025
    Copy the full SHA
    1a7b689 View commit details

Commits on May 30, 2025

  1. Copy the full SHA
    59d8c17 View commit details

Commits on Jun 6, 2025

  1. Update dependencies

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    03283cd View commit details
  2. Update PG driver

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    27f8051 View commit details
  3. Update SLF4J driver

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    767ce9d View commit details
  4. Update munit

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    f6ed488 View commit details
  5. Update AWS SDK v2

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    a0751fe View commit details
  6. Update redis

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    a0a3b5b View commit details
  7. Update redis

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    58615cd View commit details
  8. Update CI JVM to 17

    guizmaii committed Jun 6, 2025
    Copy the full SHA
    1a82041 View commit details
  9. Merge pull request #459 from guizmaii/updates

    Update some dependencies
    dimafeng authored Jun 6, 2025
    Copy the full SHA
    c2331d7 View commit details

Commits on Jun 11, 2025

  1. Copy the full SHA
    265483f View commit details

Commits on Jun 19, 2025

  1. Copy the full SHA
    d00d6a1 View commit details

Commits on Jun 22, 2025

  1. Merge pull request #471 from scala-steward/update/s3-2.31.66

    Update s3, sqs to 2.31.66
    dimafeng authored Jun 22, 2025
    Copy the full SHA
    539d215 View commit details
  2. Merge pull request #465 from scala-steward/update/postgresql-42.7.7

    Update postgresql to 42.7.7
    dimafeng authored Jun 22, 2025
    Copy the full SHA
    8c620d6 View commit details
  3. Merge pull request #454 from scala-steward/update/ojdbc8-21.18.0.0

    Update ojdbc8 to 21.18.0.0
    dimafeng authored Jun 22, 2025
    Copy the full SHA
    8057481 View commit details
6 changes: 4 additions & 2 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -15,9 +15,11 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: sbt
- run: ./sbt ci-release
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
24 changes: 7 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -12,11 +12,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java:
- 8
- 11
- 17
# - graalvm-ce-java11@20.3.0
scala: [2.12.20, 2.13.16, 3.3.6]
java: [17, 21]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
@@ -44,15 +41,8 @@ jobs:
java-version: ${{ matrix.java }}
check-latest: true
cache: "sbt"
- name: Restore cache
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
key: cache-v1-${{ hashFiles('build.sbt') }}
restore-keys: |
cache-v1-
- name: Compile and Test
run: ./sbt +test

- name: Setup sbt launcher
uses: sbt/setup-sbt@v1

- run: sbt ++${{ matrix.scala }} test
4 changes: 4 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-Dfile.encoding=UTF8
-Xms256M
-Xmx6G
-XX:+UseG1GC
18 changes: 16 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -2,11 +2,13 @@ import xerial.sbt.Sonatype.*
import ReleaseTransformations.*
import java.net.URI

Global / onChangedBuildSource := IgnoreSourceChanges

lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")

val commonSettings = Seq(
ThisBuild / scalaVersion := "2.12.19",
crossScalaVersions := Seq("2.12.19", "2.13.14", "3.3.4"),
ThisBuild / scalaVersion := "2.12.20",
crossScalaVersions := Seq("2.12.20", "2.13.16", "3.3.6"),

ThisBuild / parallelExecution := false,
fork := true,
@@ -111,6 +113,7 @@ lazy val root = (project in file("."))
moduleWireMock,
moduleYugabytedb,
moduleOpensearch,
moduleK3s,
allOld
)
.settings(noPublishSettings)
@@ -563,3 +566,14 @@ lazy val moduleOpensearch = (project in file("modules/opensearch"))
name := "testcontainers-scala-opensearch",
libraryDependencies ++= Dependencies.moduleOpensearch.value
)

lazy val moduleK3s = project.in(file("modules/k3s"))
.dependsOn(
core % "compile->compile;test->test;provided->provided",
scalatest % "test->test"
)
.settings(
commonSettings,
name := "testcontainers-scala-k3s",
libraryDependencies ++= Dependencies.moduleK3s.value
)
1 change: 1 addition & 0 deletions docs/src/main/tut/setup.md
Original file line number Diff line number Diff line change
@@ -95,6 +95,7 @@ Here is the full list of the [currently available modules](https://github.com/te
* `testcontainers-scala-redis` — module with Redis container.
* `testcontainers-scala-wiremock` - module with WireMock container.
* `testcontainers-scala-opensearch` - module with Opensearch container.
* `testcontainers-scala-k3s` - module with K3S container.

Most of the modules are just proxies to the testcontainers-java modules and behave exactly like java containers.
You can find documentation about them in the [testcontainers-java docs pages](https://www.testcontainers.org/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.dimafeng.testcontainers

import org.testcontainers.k3s.{K3sContainer => JavaK3sContainer}
import org.testcontainers.utility.DockerImageName
import org.testcontainers.containers.Network

class K3sContainer private (
dockerImageName: DockerImageName,
network: Option[Network],
networkAlias: Option[String]
) extends SingleContainer[JavaK3sContainer] {
override val container: JavaK3sContainer = {
val c = new JavaK3sContainer(dockerImageName)
network.fold(c)(c.withNetwork(_))
networkAlias.fold(c)(c.withNetworkAliases(_))
}

def generateInternalKubeConfigYaml(networkAlias: String): String = container.generateInternalKubeConfigYaml(networkAlias)
def kubeConfigYaml: String = container.getKubeConfigYaml()
}

object K3sContainer {
private[testcontainers] final val defaultImage: String = "rancher/k3s"
private[testcontainers] final val defaultTag: String = "v1.32.2-k3s1"
private[testcontainers] final val defaultDockerImageName: String = s"${defaultImage}:${defaultTag}"

case class Def(
dockerImageName: DockerImageName = DockerImageName.parse(defaultDockerImageName),
network: Option[Network] = None,
networkAlias: Option[String] = None
) extends ContainerDef {
override type Container = K3sContainer
override def createContainer(): K3sContainer = new K3sContainer(dockerImageName, network, networkAlias)

def withNetwork(network: Network): Def = copy(network = Some(network))
def withNetworkAlias(alias: String): Def = copy(networkAlias = Some(alias))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.dimafeng.testcontainers

import com.dimafeng.testcontainers.scalatest.TestContainersForAll
import org.scalatest.flatspec.AnyFlatSpec
import org.testcontainers.containers.Network
import org.testcontainers.utility.DockerImageName

class K3sSpec extends AnyFlatSpec with TestContainersForAll {
override type Containers = K3sContainer

val network: Network = Network.SHARED

override def startContainers(): K3sContainer = {
K3sContainer.Def()
.withNetwork(network)
.withNetworkAlias("k3s")
.start()
}

"K3sContainer" should "be started" in withContainers { k3s =>
val kubeConfig = k3s.generateInternalKubeConfigYaml("k3s")
k3s.container.getKubeConfigYaml()

assert(kubeConfig.contains("apiVersion"))
assert(kubeConfig.contains("kind: \"Config\""))
assert(kubeConfig.contains("clusters"))
assert(kubeConfig.contains("users"))
assert(kubeConfig.contains("contexts"))
assert(k3s.logs.contains("kube-system"))
assert(k3s.kubeConfigYaml.contains("apiVersion"))
}
}
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ case class RedpandaContainer(

object RedpandaContainer {

val defaultImage = "docker.redpanda.com/vectorized/redpanda"
val defaultImage = "docker.redpanda.com/redpandadata/redpanda"
val defaultTag = "v22.2.6"
val defaultDockerImageName = s"$defaultImage:$defaultTag"

28 changes: 17 additions & 11 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -12,35 +12,35 @@ object Dependencies {
scope.map(s => modules.map(_ % s)).getOrElse(modules)
}

private val testcontainersVersion = "1.20.2"
private val testcontainersVersion = "1.21.1"
private val seleniumVersion = "2.53.1"
private val slf4jVersion = "1.7.32"
private val slf4jVersion = "2.0.17"
private val scalaTestVersion = "3.2.9"
private val scalaTestMockitoVersion = "3.2.9.0"
private val scalaTestSeleniumVersion_scala2 = "3.2.2.0"
private val scalaTestSeleniumVersion_scala3 = "3.2.9.0"
private val junitVersion = "4.13.2"
private val munitVersion = "1.0.0"
private val munitVersion = "1.1.1"
private val mysqlConnectorVersion = "5.1.42"
private val neo4jConnectorVersion = "4.0.0"
private val oracleDriverVersion = "21.3.0.0"
private val oracleDriverVersion = "21.18.0.0"
private val cassandraDriverVersion = "4.0.1"
private val postgresqlDriverVersion = "42.2.24"
private val postgresqlDriverVersion = "42.7.7"
private val kafkaDriverVersion = "2.2.0"
private val mockitoVersion = "3.12.4"
private val restAssuredVersion = "4.0.0"
private val groovyVersion = "2.5.16"
private val awsV1Version = "1.11.479"
private val awsV2Version = "2.20.68"
private val awsV2Version = "2.31.66"
private val sttpVersion = "3.3.14"
private val firestoreConnectorVersion = "3.0.11"
private val bigtableVersion = "2.45.0"
private val pubsubVersion = "1.116.4"
private val redisTestcontainersVersion = "2.0.1"
private val jedisVersion = "5.0.0"
private val pubsubVersion = "1.139.4"
private val redisTestcontainersVersion = "2.2.4"
private val jedisVersion = "6.0.0"
private val wireMockTestcontainersVersion = "1.0-alpha-13"
private val milvusSdkVersion = "2.4.1"
private val quadrantClientVersion = "1.12.0"
private val quadrantClientVersion = "1.14.0"
private val yugabyteJdbcVersion = "42.3.5-yb-6"
private val yugabyteJavaDriverVersion = "4.15.0-yb-2-TESTFIX.0"
private val opensearchTestcontainersVersion = "1.0.0"
@@ -148,7 +148,7 @@ object Dependencies {
) ++ TEST(
("io.rest-assured" % "scala-support" % restAssuredVersion)
.exclude("org.codehaus.groovy", "groovy"),
"org.codehaus.groovy"% "groovy" % groovyVersion
"org.codehaus.groovy" % "groovy" % groovyVersion
)
)

@@ -372,4 +372,10 @@ object Dependencies {
"com.softwaremill.sttp.client3" %% "core" % sttpVersion
)
)

val moduleK3s = Def.setting(
COMPILE(
"org.testcontainers" % "k3s" % testcontainersVersion
)
)
}
2 changes: 1 addition & 1 deletion project/Plugins.sbt
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.0")
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.7
sbt.version=1.11.0
851 changes: 0 additions & 851 deletions sbt

This file was deleted.