Skip to content

Commit 710e7a7

Browse files
authored
Merge branch 'main' into 8319-hostless-urls-not-parsed-correctly
2 parents 3ea2362 + d3e2248 commit 710e7a7

File tree

40 files changed

+354
-215
lines changed

40 files changed

+354
-215
lines changed

docs/modules/databases/clickhouse.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Clickhouse Module
22

3+
Testcontainers module for [ClickHouse](https://hub.docker.com/r/clickhouse/clickhouse-server)
4+
5+
## Usage example
6+
7+
You can start a ClickHouse container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/clickhouse/src/test/java/org/testcontainers/clickhouse/ClickHouseContainerTest.java) inside_block:container
11+
<!--/codeinclude-->
12+
13+
### Testcontainers JDBC URL
14+
15+
`jdbc:tc:clickhouse:18.10.3:///databasename`
16+
17+
See [JDBC](./jdbc.md) for documentation.
18+
319
## Adding this module to your project dependencies
420

521
Add the following dependency to your `pom.xml`/`build.gradle` file:

docs/modules/databases/cockroachdb.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# CockroachDB Module
22

3+
Testcontainers module for [CockroachDB](https://hub.docker.com/r/cockroachdb/cockroach)
4+
5+
## Usage example
6+
7+
You can start a CockroachDB container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/cockroachdb/src/test/java/org/testcontainers/junit/cockroachdb/SimpleCockroachDBTest.java) inside_block:container
11+
<!--/codeinclude-->
12+
313
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
414

15+
### Testcontainers JDBC URL
16+
17+
`jdbc:tc:cockroach:v21.2.3:///databasename`
18+
19+
See [JDBC](./jdbc.md) for documentation.
20+
521
## Adding this module to your project dependencies
622

723
Add the following dependency to your `pom.xml`/`build.gradle` file:

docs/modules/databases/cratedb.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# CrateDB Module
22

3+
Testcontainers module for [CrateDB](https://hub.docker.com/_/crate)
4+
5+
## Usage example
6+
7+
You can start a CrateDB container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/cratedb/src/test/java/org/testcontainers/junit/cratedb/SimpleCrateDBTest.java) inside_block:container
11+
<!--/codeinclude-->
12+
313
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
414

15+
### Testcontainers JDBC URL
16+
17+
`jdbc:tc:cratedb:5.2.3:///databasename`
18+
19+
See [JDBC](./jdbc.md) for documentation.
20+
521
## Adding this module to your project dependencies
622

723
Add the following dependency to your `pom.xml`/`build.gradle` file:

docs/modules/databases/databend.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Databend Module
22

3+
Testcontainers module for [Databend](https://hub.docker.com/r/datafuselabs/databend)
4+
5+
## Usage example
6+
7+
You can start a Databend container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/databend/src/test/java/org/testcontainers/databend/DatabendContainerTest.java) inside_block:container
11+
<!--/codeinclude-->
12+
13+
### Testcontainers JDBC URL
14+
15+
`jdbc:tc:databend:v1.2.615:///databasename`
16+
17+
See [JDBC](./jdbc.md) for documentation.
18+
319
## Adding this module to your project dependencies
420

521
Add the following dependency to your `pom.xml`/`build.gradle` file:

docs/modules/databases/db2.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
11
# DB2 Module
22

3-
!!! note
4-
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.
5-
6-
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
3+
Testcontainers module for [DB2](https://hub.docker.com/r/ibmcom/db2)
74

85
## Usage example
96

10-
Running DB2 as a stand-in for in a test:
11-
12-
```java
13-
public class SomeTest {
14-
15-
@ClassRule
16-
public Db2Container db2 = new Db2Container()
17-
.acceptLicense();
18-
19-
@Test
20-
public void someTestMethod() {
21-
String url = db2.getJdbcUrl();
7+
You can start a DB2 container instance from any Java application by using:
228

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

2713
!!! warning "EULA Acceptance"
2814
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).
2915

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

18+
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
19+
20+
### Testcontainers JDBC URL
21+
22+
`jdbc:tc:db2:11.5.0.0a:///databasename`
23+
24+
See [JDBC](./jdbc.md) for documentation.
25+
3226
## Adding this module to your project dependencies
3327

3428
Add the following dependency to your `pom.xml`/`build.gradle` file:

docs/modules/databases/jdbc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database
3737

3838
#### Using CrateDB
3939

40-
`jdbc:tc:cratedb:5.2.3//localhost:5432/crate`
40+
`jdbc:tc:cratedb:5.2.3:///databasename`
4141

4242
#### Using DB2
4343

44-
`jdbc:tc:db2:11.5.0.0a//localhost:5432/crate`
44+
`jdbc:tc:db2:11.5.0.0a:///databasename`
4545

4646
#### Using MariaDB
4747

docs/modules/databases/mariadb.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# MariaDB Module
22

3+
Testcontainers module for [MariaDB](https://hub.docker.com/_/mariadb)
4+
5+
## Usage example
6+
7+
You can start a MySQL container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/mariadb/src/test/java/org/testcontainers/junit/mariadb/SimpleMariaDBTest.java) inside_block:container
11+
<!--/codeinclude-->
12+
313
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
414

15+
### Testcontainers JDBC URL
16+
17+
`jdbc:tc:mariadb:10.3.39:///databasename`
18+
19+
See [JDBC](./jdbc.md) for documentation.
20+
521
## MariaDB `root` user password
622

723
If no custom password is specified, the container will use the default user password `test` for the `root` user as well.

docs/modules/databases/mssqlserver.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
# MS SQL Server Module
22

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

55
## Usage example
66

7-
Running MS SQL Server as a stand-in for in a test:
8-
9-
```java
10-
public class SomeTest {
7+
You can start a MS SQL Server container instance from any Java application by using:
118

12-
@Rule
13-
public MSSQLServerContainer mssqlserver = new MSSQLServerContainer()
14-
.acceptLicense();
15-
16-
@Test
17-
public void someTestMethod() {
18-
String url = mssqlserver.getJdbcUrl();
19-
20-
... create a connection and run test as normal
21-
```
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/mssqlserver/src/test/java/org/testcontainers/junit/mssqlserver/SimpleMSSQLServerTest.java) inside_block:container
11+
<!--/codeinclude-->
2212

2313
!!! warning "EULA Acceptance"
2414
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).
2515

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

18+
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
19+
20+
### Testcontainers JDBC URL
21+
22+
`jdbc:tc:sqlserver:2017-CU12:///databasename`
23+
24+
See [JDBC](./jdbc.md) for documentation.
25+
2826
## Adding this module to your project dependencies
2927

3028
Add the following dependency to your `pom.xml`/`build.gradle` file:

docs/modules/databases/mysql.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# MySQL Module
22

3+
Testcontainers module for [MySQL](https://hub.docker.com/_/mysql)
4+
5+
## Usage example
6+
7+
You can start a MySQL container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/mysql/src/test/java/org/testcontainers/junit/mysql/SimpleMySQLTest.java) inside_block:container
11+
<!--/codeinclude-->
12+
313
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
414

15+
### Testcontainers JDBC URL
16+
17+
`jdbc:tc:mysql:8.0.36:///databasename`
18+
19+
See [JDBC](./jdbc.md) for documentation.
20+
521
## Overriding MySQL my.cnf settings
622

723
For MySQL databases, it is possible to override configuration settings using resources on the classpath. Assuming `somepath/mysql_conf_override`

docs/modules/databases/oceanbase.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# OceanBase Module
22

3+
Testcontainers module for [OceanBase](https://hub.docker.com/r/oceanbase/oceanbase-ce)
4+
5+
## Usage example
6+
7+
You can start an OceanBase container instance from any Java application by using:
8+
9+
<!--codeinclude-->
10+
[Container definition](../../../modules/oceanbase/src/test/java/org/testcontainers/oceanbase/SimpleOceanBaseCETest.java) inside_block:container
11+
<!--/codeinclude-->
12+
313
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
414

15+
### Testcontainers JDBC URL
16+
17+
`jdbc:tc:oceanbasece:4.2.1-lts:///databasename`
18+
19+
See [JDBC](./jdbc.md) for documentation.
20+
521
## Adding this module to your project dependencies
622

723
Add the following dependency to your `pom.xml`/`build.gradle` file:

0 commit comments

Comments
 (0)