From e8e48b31cc73dbd1bd69480371c3af1869821c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 4 Sep 2025 10:05:44 -0600 Subject: [PATCH] Move Ollama tests to JUnit Jupiter --- modules/ollama/build.gradle | 7 +++++++ .../org/testcontainers/ollama/OllamaContainerTest.java | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/ollama/build.gradle b/modules/ollama/build.gradle index a0256ba7150..62a34a0f05a 100644 --- a/modules/ollama/build.gradle +++ b/modules/ollama/build.gradle @@ -3,6 +3,13 @@ description = "Testcontainers :: Ollama" dependencies { api project(':testcontainers') + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0' + + testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4' testImplementation 'org.assertj:assertj-core:3.27.4' testImplementation 'io.rest-assured:rest-assured:5.5.6' } + +test { + useJUnitPlatform() +} diff --git a/modules/ollama/src/test/java/org/testcontainers/ollama/OllamaContainerTest.java b/modules/ollama/src/test/java/org/testcontainers/ollama/OllamaContainerTest.java index e4a1d61b790..dcd61cad9c4 100644 --- a/modules/ollama/src/test/java/org/testcontainers/ollama/OllamaContainerTest.java +++ b/modules/ollama/src/test/java/org/testcontainers/ollama/OllamaContainerTest.java @@ -1,6 +1,6 @@ package org.testcontainers.ollama; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.testcontainers.utility.Base58; import org.testcontainers.utility.DockerImageName; @@ -9,10 +9,10 @@ import static io.restassured.RestAssured.given; import static org.assertj.core.api.Assertions.assertThat; -public class OllamaContainerTest { +class OllamaContainerTest { @Test - public void withDefaultConfig() { + void withDefaultConfig() { try ( // container { OllamaContainer ollama = new OllamaContainer("ollama/ollama:0.1.26") // } @@ -25,7 +25,7 @@ public void withDefaultConfig() { } @Test - public void downloadModelAndCommitToImage() throws IOException, InterruptedException { + void downloadModelAndCommitToImage() throws IOException, InterruptedException { String newImageName = "tc-ollama-allminilm-" + Base58.randomString(4).toLowerCase(); try (OllamaContainer ollama = new OllamaContainer("ollama/ollama:0.1.26")) { ollama.start();