Skip to content

Commit 7a38b56

Browse files
committed
Improve database docs
1 parent 615332f commit 7a38b56

File tree

37 files changed

+250
-218
lines changed

37 files changed

+250
-218
lines changed

docs/modules/databases/clickhouse.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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+
313
## Adding this module to your project dependencies
414

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

docs/modules/databases/cockroachdb.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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

515
## Adding this module to your project dependencies

docs/modules/databases/cratedb.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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

515
## Adding this module to your project dependencies

docs/modules/databases/databend.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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+
313
## Adding this module to your project dependencies
414

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

docs/modules/databases/db2.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
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:
7+
You can start a DB2 container instance from any Java application by using:
118

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();
22-
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+
3220
## Adding this module to your project dependencies
3321

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

docs/modules/databases/mariadb.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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

515
## MariaDB `root` user password

docs/modules/databases/mssqlserver.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
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 {
11-
12-
@Rule
13-
public MSSQLServerContainer mssqlserver = new MSSQLServerContainer()
14-
.acceptLicense();
15-
16-
@Test
17-
public void someTestMethod() {
18-
String url = mssqlserver.getJdbcUrl();
7+
You can start a MS SQL Server container instance from any Java application by using:
198

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+
2820
## Adding this module to your project dependencies
2921

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

docs/modules/databases/mysql.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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

515
## Overriding MySQL my.cnf settings

docs/modules/databases/oceanbase.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
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

515
## Adding this module to your project dependencies

docs/modules/databases/oraclefree.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Oracle Database Free 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 [Oracle Free](https://hub.docker.com/r/gvenzl/oracle-free)
44

55
## Usage example
66

7-
You can use `OracleContainer` like any other JDBC container:
7+
You can start an Oracle-Free container instance from any Java application by using:
8+
89
<!--codeinclude-->
9-
[Container creation](../../../modules/oracle-free/src/test/java/org/testcontainers/junit/oracle/SimpleOracleTest.java) inside_block:constructor
10+
[Container creation](../../../modules/oracle-free/src/test/java/org/testcontainers/junit/oracle/SimpleOracleTest.java) inside_block:container
1011
<!--/codeinclude-->
1112

13+
See [Database containers](./index.md) for documentation and usage that is common to all relational database container types.
14+
1215
## Adding this module to your project dependencies
1316

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

0 commit comments

Comments
 (0)