Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/modules/databases/clickhouse.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Clickhouse Module

Testcontainers module for [ClickHouse](https://hub.docker.com/r/clickhouse/clickhouse-server)

## Usage example

You can start a ClickHouse container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/clickhouse/src/test/java/org/testcontainers/clickhouse/ClickHouseContainerTest.java) inside_block:container
<!--/codeinclude-->

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/cockroachdb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CockroachDB Module

Testcontainers module for [CockroachDB](https://hub.docker.com/r/cockroachdb/cockroach)

## Usage example

You can start a CockroachDB container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/cockroachdb/src/test/java/org/testcontainers/junit/cockroachdb/SimpleCockroachDBTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/cratedb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CrateDB Module

Testcontainers module for [CrateDB](https://hub.docker.com/_/crate)

## Usage example

You can start a CrateDB container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/cratedb/src/test/java/org/testcontainers/junit/cratedb/SimpleCrateDBTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/databend.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Databend Module

Testcontainers module for [Databend](https://hub.docker.com/r/datafuselabs/databend)

## Usage example

You can start a Databend container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/databend/src/test/java/org/testcontainers/databend/DatabendContainerTest.java) inside_block:container
<!--/codeinclude-->

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
26 changes: 7 additions & 19 deletions docs/modules/databases/db2.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
# DB2 Module

!!! note
This module is INCUBATING. While it is ready for use and operational in the current version of Testcontainers, it is possible that it may receive breaking changes in the future. See [our contributing guidelines](/contributing/#incubating-modules) for more information on our incubating modules policy.

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
Testcontainers module for [DB2](https://hub.docker.com/r/ibmcom/db2)

## Usage example

Running DB2 as a stand-in for in a test:
You can start a DB2 container instance from any Java application by using:

```java
public class SomeTest {

@ClassRule
public Db2Container db2 = new Db2Container()
.acceptLicense();

@Test
public void someTestMethod() {
String url = db2.getJdbcUrl();

... create a connection and run test as normal
}
```
<!--codeinclude-->
[Container definition](../../../modules/db2/src/test/java/org/testcontainers/junit/db2/SimpleDb2Test.java) inside_block:container
<!--/codeinclude-->

!!! warning "EULA Acceptance"
Due to licencing restrictions you are required to accept an EULA for this container image. To indicate that you accept the DB2 image EULA, call the `acceptLicense()` method, or place a file at the root of the classpath named `container-license-acceptance.txt`, e.g. at `src/test/resources/container-license-acceptance.txt`. This file should contain the line: `ibmcom/db2:11.5.0.0a` (or, if you are overriding the docker image name/tag, update accordingly).

Please see the [`ibmcom/db2` image documentation](https://hub.docker.com/r/ibmcom/db2) for a link to the EULA document.

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/mariadb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# MariaDB Module

Testcontainers module for [MariaDB](https://hub.docker.com/_/mariadb)

## Usage example

You can start a MySQL container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/mariadb/src/test/java/org/testcontainers/junit/mariadb/SimpleMariaDBTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## MariaDB `root` user password
Expand Down
22 changes: 7 additions & 15 deletions docs/modules/databases/mssqlserver.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
# MS SQL Server Module

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
Testcontainers module for [MS SQL Server](https://mcr.microsoft.com/en-us/artifact/mar/mssql/server/)

## Usage example

Running MS SQL Server as a stand-in for in a test:

```java
public class SomeTest {

@Rule
public MSSQLServerContainer mssqlserver = new MSSQLServerContainer()
.acceptLicense();

@Test
public void someTestMethod() {
String url = mssqlserver.getJdbcUrl();
You can start a MS SQL Server container instance from any Java application by using:

... create a connection and run test as normal
```
<!--codeinclude-->
[Container definition](../../../modules/mssqlserver/src/test/java/org/testcontainers/junit/mssqlserver/SimpleMSSQLServerTest.java) inside_block:container
<!--/codeinclude-->

!!! warning "EULA Acceptance"
Due to licencing restrictions you are required to accept an EULA for this container image. To indicate that you accept the MS SQL Server image EULA, call the `acceptLicense()` method, or place a file at the root of the classpath named `container-license-acceptance.txt`, e.g. at `src/test/resources/container-license-acceptance.txt`. This file should contain the line: `mcr.microsoft.com/mssql/server:2017-CU12` (or, if you are overriding the docker image name/tag, update accordingly).

Please see the [`microsoft-mssql-server` image documentation](https://hub.docker.com/_/microsoft-mssql-server#environment-variables) for a link to the EULA document.

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/mysql.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# MySQL Module

Testcontainers module for [MySQL](https://hub.docker.com/_/mysql)

## Usage example

You can start a MySQL container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/mysql/src/test/java/org/testcontainers/junit/mysql/SimpleMySQLTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Overriding MySQL my.cnf settings
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/oceanbase.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# OceanBase Module

Testcontainers module for [OceanBase](https://hub.docker.com/r/oceanbase/oceanbase-ce)

## Usage example

You can start an OceanBase container instance from any Java application by using:

<!--codeinclude-->
[Container definition](../../../modules/oceanbase/src/test/java/org/testcontainers/oceanbase/SimpleOceanBaseCETest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies
Expand Down
9 changes: 6 additions & 3 deletions docs/modules/databases/oraclefree.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Oracle Database Free Module

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
Testcontainers module for [Oracle Free](https://hub.docker.com/r/gvenzl/oracle-free)

## Usage example

You can use `OracleContainer` like any other JDBC container:
You can start an Oracle-Free container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/oracle-free/src/test/java/org/testcontainers/junit/oracle/SimpleOracleTest.java) inside_block:constructor
[Container creation](../../../modules/oracle-free/src/test/java/org/testcontainers/junit/oracle/SimpleOracleTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
9 changes: 6 additions & 3 deletions docs/modules/databases/oraclexe.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Oracle-XE Module

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
Testcontainers module for [Oracle XE](https://hub.docker.com/r/gvenzl/oracle-xe)

## Usage example

You can use `OracleContainer` like any other JDBC container:
You can start an Oracle-XE container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/oracle-xe/src/test/java/org/testcontainers/junit/oracle/SimpleOracleTest.java) inside_block:constructor
[Container creation](../../../modules/oracle-xe/src/test/java/org/testcontainers/junit/oracle/SimpleOracleTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
42 changes: 5 additions & 37 deletions docs/modules/databases/orientdb.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,14 @@
# OrientDB Module

!!! note
This module is INCUBATING. While it is ready for use and operational in the current version of Testcontainers, it is possible that it may receive breaking changes in the future. See [our contributing guidelines](/contributing/#incubating-modules) for more information on our incubating modules policy.


This module helps running [OrientDB](https://orientdb.org/download) using Testcontainers.

Note that it's based on the [official Docker image](https://hub.docker.com/_/orientdb/) provided by OrientDB.
Testcontainers module for [OrientDB](https://hub.docker.com/_/orientdb/)

## Usage example

Declare your Testcontainers instance as a `@ClassRule` or `@Rule` in a JUnit 4 test or as static or member attribute of a JUnit 5 test annotated with `@Container` as you would with other Testcontainers.
You can call `getDbUrl()` OrientDB container and build the `ODatabaseSession` by your own, but a more useful `getSession()` method is provided.
On the JVM you would most likely use the [Java driver](https://github.com/).

The following example uses the JUnit 5 extension `@Testcontainers` and demonstrates both the usage of the Java Client:

=== "JUnit 5 example"
```java
@Testcontainers
public class ExampleTest {

@Container
private static OrientDBContainer container = new OrientDBContainer();

@Test
void testDbCreation() {

final ODatabaseSession session = container.getSession();

session.command("CREATE CLASS Person EXTENDS V");
session.command("INSERT INTO Person set name='john'");
session.command("INSERT INTO Person set name='jane'");

assertThat(session.query("SELECT FROM Person").stream()).hasSize(2);
}

}
```

You are not limited to Unit tests and can of course use an instance of the OrientDB Testcontainers implementation in vanilla Java code as well.
You can start an OrientDB container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/orientdb/src/test/java/org/testcontainers/containers/OrientDBContainerTest.java) inside_block:container
<!--/codeinclude-->

## Adding this module to your project dependencies

Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/postgres.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Postgres Module

Testcontainers module for [PostgresSQL](https://hub.docker.com/_/postgres)

## Usage example

You can start a PostgreSQL container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/postgresql/src/test/java/org/testcontainers/junit/postgresql/SimplePostgreSQLTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Compatible images
Expand Down
11 changes: 9 additions & 2 deletions docs/modules/databases/questdb.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# QuestDB Module

Testcontainers module for [QuestDB](https://github.com/questdb/questdb). QuestDB is a high-performance, open-source SQL
database for applications in financial services, IoT, machine learning, DevOps and observability.
Testcontainers module for [QuestDB](https://hub.docker.com/r/questdb/questdb)

## Usage example

You can start a QuestDB container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/questdb/src/test/java/org/testcontainers/junit/questdb/SimpleQuestDBTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container
types.
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/tidb.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# TiDB Module

Testcontainers module for [TiDB](https://hub.docker.com/r/pingcap/tidb)

## Usage example

You can start a TiDB container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/tidb/src/test/java/org/testcontainers/junit/tidb/SimpleTiDBTest.java) inside_block:container
<!--/codeinclude-->

See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.

## Adding this module to your project dependencies
Expand Down
10 changes: 10 additions & 0 deletions docs/modules/databases/timeplus.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Timeplus Module

Testcontainers module for [Timeplus](https://hub.docker.com/r/timeplus/timeplusd)

## Usage example

You can start a Timeplus container instance from any Java application by using:

<!--codeinclude-->
[Container creation](../../../modules/timeplus/src/test/java/org/testcontainers/timeplus/TimeplusContainerTest.java) inside_block:container
<!--/codeinclude-->

## Adding this module to your project dependencies

Add the following dependency to your `pom.xml`/`build.gradle` file:
Expand Down
Loading
Loading