Skip to content

Commit e8e48b3

Browse files
committed
Move Ollama tests to JUnit Jupiter
1 parent dbf1f40 commit e8e48b3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

modules/ollama/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ description = "Testcontainers :: Ollama"
33
dependencies {
44
api project(':testcontainers')
55

6+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'
7+
8+
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
69
testImplementation 'org.assertj:assertj-core:3.27.4'
710
testImplementation 'io.rest-assured:rest-assured:5.5.6'
811
}
12+
13+
test {
14+
useJUnitPlatform()
15+
}

modules/ollama/src/test/java/org/testcontainers/ollama/OllamaContainerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.testcontainers.ollama;
22

3-
import org.junit.Test;
3+
import org.junit.jupiter.api.Test;
44
import org.testcontainers.utility.Base58;
55
import org.testcontainers.utility.DockerImageName;
66

@@ -9,10 +9,10 @@
99
import static io.restassured.RestAssured.given;
1010
import static org.assertj.core.api.Assertions.assertThat;
1111

12-
public class OllamaContainerTest {
12+
class OllamaContainerTest {
1313

1414
@Test
15-
public void withDefaultConfig() {
15+
void withDefaultConfig() {
1616
try ( // container {
1717
OllamaContainer ollama = new OllamaContainer("ollama/ollama:0.1.26")
1818
// }
@@ -25,7 +25,7 @@ public void withDefaultConfig() {
2525
}
2626

2727
@Test
28-
public void downloadModelAndCommitToImage() throws IOException, InterruptedException {
28+
void downloadModelAndCommitToImage() throws IOException, InterruptedException {
2929
String newImageName = "tc-ollama-allminilm-" + Base58.randomString(4).toLowerCase();
3030
try (OllamaContainer ollama = new OllamaContainer("ollama/ollama:0.1.26")) {
3131
ollama.start();

0 commit comments

Comments
 (0)