Skip to content

Commit 2d09155

Browse files
rnorthkiview
andauthored
Upgrade mkdocs (#3443)
Co-authored-by: Kevin Wittek <[email protected]>
1 parent 1c9ab86 commit 2d09155

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+675
-618
lines changed

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If the answers to the above are all yes, then a new module may be a good approac
3535
Otherwise, it is entirely possible for you to:
3636

3737
* publish a code snippet
38-
* contribute an [example](../examples/README.md) to the Testcontainers repo
38+
* contribute an example to the Testcontainers repo
3939
* publish your own third party library
4040

4141
In any case, please contact us to help validate your proposal!

docs/index.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Testcontainers
22

3-
![Testcontainers logo](./logo.png)
3+
<!-- allow aspect ratio computation to reduce layout shift. CSS enforces max-width: 100% -->
4+
<img src="logo.png" alt="Testcontainers logo" width="1024" height="512"/>
45

56
## About
67

@@ -31,18 +32,19 @@ Testcontainers is distributed as separate JARs with a common version number:
3132

3233
For the core library, the latest Maven/Gradle dependency is as follows:
3334

34-
```groovy tab='Gradle'
35-
testImplementation "org.testcontainers:testcontainers:{{latest_version}}"
36-
```
37-
38-
```xml tab='Maven'
39-
<dependency>
40-
<groupId>org.testcontainers</groupId>
41-
<artifactId>testcontainers</artifactId>
42-
<version>{{latest_version}}</version>
43-
<scope>test</scope>
44-
</dependency>
45-
```
35+
=== "Gradle"
36+
```groovy
37+
testImplementation "org.testcontainers:testcontainers:{{latest_version}}"
38+
```
39+
=== "Maven"
40+
```xml
41+
<dependency>
42+
<groupId>org.testcontainers</groupId>
43+
<artifactId>testcontainers</artifactId>
44+
<version>{{latest_version}}</version>
45+
<scope>test</scope>
46+
</dependency>
47+
```
4648

4749
You can also [check the latest version available on Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.testcontainers%22).
4850

@@ -51,8 +53,8 @@ You can also [check the latest version available on Maven Central](https://searc
5153
To avoid specifying the version of each dependency, you can use a `BOM` or `Bill Of Materials`.
5254

5355
Using Maven you can add the following to `dependencyManagement` section in your `pom.xml`:
54-
55-
```xml tab='Maven'
56+
=== "Maven"
57+
```xml
5658
<dependencyManagement>
5759
<dependencies>
5860
<dependency>
@@ -67,21 +69,22 @@ Using Maven you can add the following to `dependencyManagement` section in your
6769
```
6870

6971
and then use dependencies without specifying a version:
70-
71-
```xml tab='Maven'
72-
<dependency>
73-
<groupId>org.testcontainers</groupId>
74-
<artifactId>mysql</artifactId>
75-
<scope>test</scope>
76-
</dependency>
77-
```
72+
=== "Maven"
73+
```xml
74+
<dependency>
75+
<groupId>org.testcontainers</groupId>
76+
<artifactId>mysql</artifactId>
77+
<scope>test</scope>
78+
</dependency>
79+
```
7880

7981
Using Gradle 5.0 or higher, you can add the following to the `dependencies` section in your `build.gradle`:
8082

81-
```groovy tab='Gradle'
82-
implementation platform('org.testcontainers:testcontainers-bom:{{latest_version}}') //import bom
83-
testImplementation('org.testcontainers:mysql') //no version specified
84-
```
83+
=== "Gradle"
84+
```groovy
85+
implementation platform('org.testcontainers:testcontainers-bom:{{latest_version}}') //import bom
86+
testImplementation('org.testcontainers:mysql') //no version specified
87+
```
8588

8689

8790
[JitPack](jitpack_dependencies.md) builds are available for pre-release versions.

docs/modules/azure.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,18 @@ Test against the Emulator:
4949

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

52-
```groovy tab='Gradle'
53-
testImplementation "org.testcontainers:azure:{{latest_version}}"
54-
```
55-
56-
```xml tab='Maven'
57-
<dependency>
58-
<groupId>org.testcontainers</groupId>
59-
<artifactId>azure</artifactId>
60-
<version>{{latest_version}}</version>
61-
<scope>test</scope>
62-
</dependency>
63-
```
52+
=== "Gradle"
53+
```groovy
54+
testImplementation "org.testcontainers:azure:{{latest_version}}"
55+
```
56+
57+
=== "Maven"
58+
```xml
59+
<dependency>
60+
<groupId>org.testcontainers</groupId>
61+
<artifactId>azure</artifactId>
62+
<version>{{latest_version}}</version>
63+
<scope>test</scope>
64+
</dependency>
65+
```
6466

docs/modules/databases/cassandra.md

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,51 @@
44

55
This example connects to the Cassandra Cluster, creates a keyspaces and asserts that is has been created.
66

7-
```java tab="JUnit 4 example"
8-
public class SomeTest {
9-
10-
@Rule
11-
public CassandraContainer cassandra = new CassandraContainer();
12-
13-
14-
@Test
15-
public void test(){
16-
Cluster cluster = cassandra.getCluster();
17-
18-
try(Session session = cluster.connect()) {
19-
20-
session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH replication = \n" +
21-
"{'class':'SimpleStrategy','replication_factor':'1'};");
22-
23-
List<KeyspaceMetadata> keyspaces = session.getCluster().getMetadata().getKeyspaces();
24-
List<KeyspaceMetadata> filteredKeyspaces = keyspaces
25-
.stream()
26-
.filter(km -> km.getName().equals("test"))
27-
.collect(Collectors.toList());
28-
29-
assertEquals(1, filteredKeyspaces.size());
7+
=== "JUnit 4 example"
8+
```java
9+
public class SomeTest {
10+
11+
@Rule
12+
public CassandraContainer cassandra = new CassandraContainer();
13+
14+
15+
@Test
16+
public void test(){
17+
Cluster cluster = cassandra.getCluster();
18+
19+
try(Session session = cluster.connect()) {
20+
21+
session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH replication = \n" +
22+
"{'class':'SimpleStrategy','replication_factor':'1'};");
23+
24+
List<KeyspaceMetadata> keyspaces = session.getCluster().getMetadata().getKeyspaces();
25+
List<KeyspaceMetadata> filteredKeyspaces = keyspaces
26+
.stream()
27+
.filter(km -> km.getName().equals("test"))
28+
.collect(Collectors.toList());
29+
30+
assertEquals(1, filteredKeyspaces.size());
31+
}
3032
}
33+
3134
}
32-
33-
}
34-
```
35+
```
3536

3637
## Adding this module to your project dependencies
3738

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

40-
```groovy tab='Gradle'
41-
testImplementation "org.testcontainers:cassandra:{{latest_version}}"
42-
```
43-
44-
```xml tab='Maven'
45-
<dependency>
46-
<groupId>org.testcontainers</groupId>
47-
<artifactId>cassandra</artifactId>
48-
<version>{{latest_version}}</version>
49-
<scope>test</scope>
50-
</dependency>
51-
```
41+
=== "Gradle"
42+
```groovy
43+
testImplementation "org.testcontainers:cassandra:{{latest_version}}"
44+
```
45+
46+
=== "Maven"
47+
```xml
48+
<dependency>
49+
<groupId>org.testcontainers</groupId>
50+
<artifactId>cassandra</artifactId>
51+
<version>{{latest_version}}</version>
52+
<scope>test</scope>
53+
</dependency>
54+
```

docs/modules/databases/clickhouse.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44

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

7-
```groovy tab='Gradle'
8-
testImplementation "org.testcontainers:clickhouse:{{latest_version}}"
9-
```
7+
=== "Gradle"
8+
```groovy
9+
testImplementation "org.testcontainers:clickhouse:{{latest_version}}"
10+
```
1011

11-
```xml tab='Maven'
12-
<dependency>
13-
<groupId>org.testcontainers</groupId>
14-
<artifactId>clickhouse</artifactId>
15-
<version>{{latest_version}}</version>
16-
<scope>test</scope>
17-
</dependency>
18-
```
12+
=== "Maven"
13+
```xml
14+
<dependency>
15+
<groupId>org.testcontainers</groupId>
16+
<artifactId>clickhouse</artifactId>
17+
<version>{{latest_version}}</version>
18+
<scope>test</scope>
19+
</dependency>
20+
```
1921

2022
!!! hint
2123
Adding this Testcontainers library JAR will not automatically add a database driver JAR to your project. You should ensure that your project also has a suitable database driver as a dependency.

docs/modules/databases/cockroachdb.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ See [Database containers](./index.md) for documentation and usage that is common
66

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

9-
```groovy tab='Gradle'
10-
testImplementation "org.testcontainers:cockroachdb:{{latest_version}}"
11-
```
9+
=== "Gradle"
10+
```groovy
11+
testImplementation "org.testcontainers:cockroachdb:{{latest_version}}"
12+
```
1213

13-
```xml tab='Maven'
14-
<dependency>
15-
<groupId>org.testcontainers</groupId>
16-
<artifactId>cockroachdb</artifactId>
17-
<version>{{latest_version}}</version>
18-
<scope>test</scope>
19-
</dependency>
20-
```
14+
=== "Maven"
15+
```xml
16+
<dependency>
17+
<groupId>org.testcontainers</groupId>
18+
<artifactId>cockroachdb</artifactId>
19+
<version>{{latest_version}}</version>
20+
<scope>test</scope>
21+
</dependency>
22+
```
2123

2224
!!! hint
2325
Adding this Testcontainers library JAR will not automatically add a database driver JAR to your project. You should ensure that your project also has a suitable database driver as a dependency.

docs/modules/databases/couchbase.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ Running Couchbase as a stand-in in a test:
2727

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

30-
```groovy tab='Gradle'
31-
testImplementation "org.testcontainers:couchbase:{{latest_version}}"
32-
```
33-
34-
```xml tab='Maven'
35-
<dependency>
36-
<groupId>org.testcontainers</groupId>
37-
<artifactId>couchbase</artifactId>
38-
<version>{{latest_version}}</version>
39-
<scope>test</scope>
40-
</dependency>
41-
```
30+
=== "Gradle"
31+
```groovy
32+
testImplementation "org.testcontainers:couchbase:{{latest_version}}"
33+
```
34+
=== "Maven"
35+
```xml
36+
<dependency>
37+
<groupId>org.testcontainers</groupId>
38+
<artifactId>couchbase</artifactId>
39+
<version>{{latest_version}}</version>
40+
<scope>test</scope>
41+
</dependency>
42+
```

docs/modules/databases/db2.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@ public class SomeTest {
3333

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

36-
```groovy tab='Gradle'
37-
testImplementation "org.testcontainers:db2:{{latest_version}}"
38-
```
39-
40-
```xml tab='Maven'
41-
<dependency>
42-
<groupId>org.testcontainers</groupId>
43-
<artifactId>db2</artifactId>
44-
<version>{{latest_version}}</version>
45-
<scope>test</scope>
46-
</dependency>
47-
```
36+
=== "Gradle"
37+
```groovy
38+
testImplementation "org.testcontainers:db2:{{latest_version}}"
39+
```
40+
=== "Maven"
41+
```xml
42+
<dependency>
43+
<groupId>org.testcontainers</groupId>
44+
<artifactId>db2</artifactId>
45+
<version>{{latest_version}}</version>
46+
<scope>test</scope>
47+
</dependency>
48+
```
4849
4950
!!! hint
5051
Adding this Testcontainers library JAR will not automatically add a database driver JAR to your project. You should ensure that your project also has a suitable database driver as a dependency.

docs/modules/databases/dynalite.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ In part, because it's light and quick to run. Also, please see the [reasons give
2929

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

32-
```groovy tab='Gradle'
33-
testImplementation "org.testcontainers:dynalite:{{latest_version}}"
34-
```
35-
36-
```xml tab='Maven'
37-
<dependency>
38-
<groupId>org.testcontainers</groupId>
39-
<artifactId>dynalite</artifactId>
40-
<version>{{latest_version}}</version>
41-
<scope>test</scope>
42-
</dependency>
43-
```
32+
=== "Gradle"
33+
```groovy
34+
testImplementation "org.testcontainers:dynalite:{{latest_version}}"
35+
```
36+
=== "Maven"
37+
```xml
38+
<dependency>
39+
<groupId>org.testcontainers</groupId>
40+
<artifactId>dynalite</artifactId>
41+
<version>{{latest_version}}</version>
42+
<scope>test</scope>
43+
</dependency>
44+
```
4445

4546
!!! hint
4647
Adding this Testcontainers library JAR will not automatically add an AWS SDK JAR to your project. You should ensure that your project also has a suitable AWS SDK JAR as a dependency.

0 commit comments

Comments
 (0)