Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.18.0 #343

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 21, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.testcontainers:testcontainers-bom (source) 1.17.5 -> 1.18.0 age adoption passing confidence

Release Notes

testcontainers/testcontainers-java

v1.18.0

Compare Source

Core module
  • Modules images such as MySQLContainer are now automatically compatible with their corresponding images with the library prefix
MySQLContainer<?> mysql = new MySQLContainer<>("library/mysql");
  • testcontainers/vnc has been bumped to version 1.3.0, which brings ARM support.
  • Goodbye to the whale in the logs. In order to provide an easy way to filter container logs the tc prefix has been added to display all container logs or tc.<image-name:tag> for a specific one. Check the logging docs.
  • There is a new WaitStrategy, ShellStrategy. It can also be used by calling Wait.forSuccessfulCommand(<command>)
New integration

Jib has been integrated to Testcontainers in order to take advantage of the nice API it provides to create containers

GenericContainer<?> busybox = new GenericContainer<>(
                new JibImage(
                    "busybox:1.35",
                    jibContainerBuilder -> {
                        return jibContainerBuilder.setEntrypoint("echo", "Hello World");
                    }
                )
            )
                .withStartupCheckStrategy(new OneShotStartupCheckStrategy().withTimeout(Duration.ofSeconds(3)))
New modules 🆕
CrateDB module

In order to use CrateDBContainer , declare the dependency in your pom.xml/build.gradle

<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>cratedb</artifactId>
    <version>1.18.0</version>
    <scope>test</scope>
</dependency>
testImplementation "org.testcontainers:cratedb:1.18.0"

Choose a crate image version and use it as declared below with your postgres driver

CrateDBContainer cratedb = new CrateDBContainer("crate:5.2.5");
Solace Module

In order to use SolaceContainer , declare the dependency in your pom.xml/build.gradle

<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>solace</artifactId>
    <version>1.18.0</version>
    <scope>test</scope>
</dependency>
testImplementation "org.testcontainers:solace:1.18.0"

Now, you can use a Solace PubSub running in a container and connecting via AMQP by doing the following:

SolaceContainer solace = new SolaceContainer("solace/solace-pubsub-standard:10.2");
solace.start();
Session session = createSession(
                solaceContainer.getUsername(),
                solaceContainer.getPassword(),
                solaceContainer.getOrigin(Service.AMQP)
            );

More information about SolaceContainer can be found in the documentation.

Container modules
CockroachDB

Starting with cockroachdb/cockroach:22.1.0, there is support for setting the username, password and database name via environment variables. Now, the Testcontainers module provides convenient setters:

CockroachContainer cockroach = new CockroachContainer("cockroachdb/cockroach:22.1.0")
    .withUsername("test_user")
    .withPassword("test_password")
    .withDatabaseName("test_database");
GCloud module

Google has released a new image which supports ARM and therefore BigtableEmulatorContainer, DatastoreEmulatorContainer, FirestoreEmulatorContainer, PubSubEmulatorContainer now support it as well.

So, if previously you were doing something like

DockerImageName.parse("gcr.io/google.com/cloudsdktool/google-cloud-cli:380.0.0-emulators")
    .asCompatibleSubstituteFor("gcr.io/google.com/cloudsdktool/cloud-sdk");

Now, you can simply do

DockerImageName.parse("gcr.io/google.com/cloudsdktool/google-cloud-cli:380.0.0-emulators");
JUnit Jupiter Module

@Testcontainers offers a new attribute parallel, which start those containers classes annotated by @Container

@&#8203;Testcontainers(parallel = true)
class ParallelTest {

	@&#8203;Container
private static final PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:15-alpine")
    .withCopyFileToContainer(MountableFile.forClasspathResource("db.sql"), "/docker-entrypoint-initdb.d/")
    .withNetwork(network)
    .withNetworkAliases("postgres");

@&#8203;Container
private static final ToxiproxyContainer toxiproxy = new ToxiproxyContainer("ghcr.io/shopify/toxiproxy:2.5.0")
    .withNetwork(network);

}
Kafka Module

Self-managed or Kraft mode (a.k.a Zookeeperless) support has been added

KafkaContainer kafka = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:7.0.1")).withKraft()
LocalStack Module

SERVICES environment variable became optional in version 0.13.0 and instead LocalStack will initialize a service once the first request is served. So, nowadays LocalStackContainer can be used just like this:

LocalStackContainer localstack = new LocalStackContainer("localstack/localstack:2.0.0");

Also, LocalStack module supports version 2.0. It is highly recommended to use the latest version of LocalStack images.
Last but not least, dependency on AWS SDK V1 was dropped. So, that means by upgrading to version 1.18.0, the dependency can be removed if not used directly.

MongoDB Module

MongoDBContainer by default has been enabling ReplicaSet mode. Starting in this version, sharding has been added.

MongoDBContainer mongodb = new MongoDBContainer("mongo:6")
    .withSharding();
Selenium Module

Selenium 4 has built-in support for Microsoft Edge (which is based on Chromium) and now it is supported by BrowserWebDriverContainer as well:

BrowserWebDriverContainer<?> edge = new BrowserWebDriverContainer<>("selenium/standalone-edge:4.8.0")
    .withCapabilities(new EdgeOptions());
More
⚠️ Breaking API changes
  • Removed deprecated methods and undeclared transitive dependency to AWS SDK v1 (#​5827) @​AB-xdev
  • Move junit-jupiter-api's dependency configuration to implementation (#​5985) @​edysli
🚀 Features & Enhancements
☠️ Deprecations
🐛 Bug Fixes
  • Short-circuit CompletableFuture returned by Startables#deepStart on exception (#​5930) @​pivovarit
  • fix: Don't return JSON auth config for partial registry name match (#​6323) @​kiview
  • Fix allowInsecure() on HttpWaitStrategy for non-localhost Docker daemon (#​6314) @​kiview

v1.17.6

Compare Source

What's Changed
Highlights

This release has been made possible through the efforts of 20 contributors. The Testcontainers does not cease to amaze us, thanks to everyone of you and thanks for the ongoing support and collaboration 🥰.

This release brings a lot of database love with 2 new modules, and as always a couple of bug fixes and improvements

New Module: QuestDB (#​5995) @​Vangreen

QuestDB, is a high-performance, open-source SQL database for applications in financial services, IoT, machine learning, DevOps and observability.

var container = new QuestDBContainer("questdb/questdb:6.5.3")
container.start()
var connectionUrl = container.getHttpUrl()
// use the connectionUrl and start testing!
New Module: YugabyteDB (#​4372) @​srinivasa-vasu

YugabyteDB, is a modern distributed SQL database for transactional cloud native applications. PostgreSQL compatible. It offers two APIs, SQL and CQL.

var container = new YugabyteDBYSQLContainer("yugabytedb/yugabyte:2.14.4.0-b26");
container.start()
var jdbcUrl = container.getJdbcUrl();
// use the jdbcUrl and start testing!
var container = new YugabyteDBYCQLContainer("yugabytedb/yugabyte:2.14.4.0-b26");
container.start()
var contactPoint = container.getContactPoint();
// use the contactPoint and start testing!
🚀 Features & Enhancements
🐛 Bug Fixes
📖 Documentation
🧹 Housekeeping
📦 Dependency updates
9 changes * Ignore updates for org.neo4j:neo4j (#​6112) @​eddumelendez * Combined dependencies PR (#​6210) @​eddumelendez * Combined dependencies PR (#​6205) @​eddumelendez * Combined dependencies PR (#​6173) @​eddumelendez * Combined dependencies PR (#​6153) @​eddumelendez * Combined dependencies PR (#​6150) @​eddumelendez

Configuration

📅 Schedule: Branch creation - "every weekend" in timezone Europe/Prague, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@github-actions
Copy link

❌ GraalVM CE CI 17 dev failed: https://ge.micronaut.io/s/x5edtktrhbw5g

@sonarcloud
Copy link

sonarcloud bot commented Jan 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link

❌ Java CI failed: https://ge.micronaut.io/s/gxscvmrr3oeks

@renovate renovate bot force-pushed the renovate/testcontainers-java-monorepo branch from 43231f7 to fc39105 Compare March 15, 2023 16:20
@renovate renovate bot force-pushed the renovate/testcontainers-java-monorepo branch from fc39105 to ed31c83 Compare March 30, 2023 23:52
@renovate renovate bot changed the title fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.17.6 fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.18.0 Apr 4, 2023
@renovate renovate bot force-pushed the renovate/testcontainers-java-monorepo branch from ed31c83 to 0849cee Compare April 4, 2023 20:56
@sonarcloud
Copy link

sonarcloud bot commented Apr 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sdelamo sdelamo merged commit ff1aeb0 into master Apr 20, 2023
@sdelamo sdelamo deleted the renovate/testcontainers-java-monorepo branch April 20, 2023 04:46
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant