Skip to content

Commit 3adb873

Browse files
dosadczukcopybara-github
authored andcommitted
test: gate LocalModelIntegrationTest on ADK_RUN_LOCAL_MODEL_TESTS
- `ADK_RUN_INTEGRATION_TESTS=true` no longer runs `LocalModelIntegrationTest`. PiperOrigin-RevId: 1007043371
1 parent 84bae34 commit 3adb873

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎contrib/spring-ai/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,9 @@ export OPENAI_API_KEY=your_key
646646
export GOOGLE_API_KEY=your_key
647647
export ANTHROPIC_API_KEY=your_key
648648

649+
# Opt in to LocalModelIntegrationTest, which runs Ollama in Docker
650+
export ADK_RUN_LOCAL_MODEL_TESTS=true
651+
649652
# Run specific integration test
650653
mvn test -Dtest=OpenAiApiIntegrationTest
651654

‎contrib/spring-ai/src/test/java/com/google/adk/models/springai/ollama/LocalModelIntegrationTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
import org.springframework.ai.ollama.api.OllamaApi;
3535
import org.springframework.ai.ollama.api.OllamaChatOptions;
3636

37-
// @Disabled("To avoid making the assumption that Ollama is available in the CI pipeline")
38-
@EnabledIfEnvironmentVariable(named = "ADK_RUN_INTEGRATION_TESTS", matches = "true")
37+
/** Needs Docker for Ollama; runs only when {@code ADK_RUN_LOCAL_MODEL_TESTS=true}. */
38+
@EnabledIfEnvironmentVariable(named = "ADK_RUN_LOCAL_MODEL_TESTS", matches = "true")
3939
class LocalModelIntegrationTest {
4040

4141
private static OllamaTestContainer ollamaContainer;

0 commit comments

Comments
 (0)