Skip to content

Commit 5949010

Browse files
dosadczukcopybara-github
authored andcommitted
test: gate LocalModelIntegrationTest on ADK_RUN_LOCAL_MODEL_TESTS
PiperOrigin-RevId: 1007043371
1 parent 49e6c18 commit 5949010

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎contrib/spring-ai/README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,16 +668,19 @@ The library includes comprehensive integration tests for different providers:
668668
### Running Integration Tests
669669

670670
```bash
671-
# Opt in to integration tests (gates the Gemini and Ollama tests)
671+
# Opt in to GeminiApiIntegrationTest
672672
export ADK_RUN_INTEGRATION_TESTS=true
673673
# Set Gemini model name for integration tests
674-
export GEMINi_MODEL=gemini-3.8-flash
674+
export GEMINI_MODEL=gemini-3.8-flash
675675

676676
# Set required environment variables
677677
export OPENAI_API_KEY=your_key
678678
export GOOGLE_CLOUD_PROJECT=your_project_id
679679
export ANTHROPIC_API_KEY=your_key
680680

681+
# Opt in to LocalModelIntegrationTest, which runs Ollama in Docker
682+
export ADK_RUN_LOCAL_MODEL_TESTS=true
683+
681684
# Run specific integration test
682685
mvn test -Dtest=OpenAiApiIntegrationTest
683686

‎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)