Update Ollama host and clean up integration tests

Changed the remote Ollama host IP in Makefile and test setup to 192.168.29.229. Fixed a typo in a test method name and removed unused StringBuffer variables and related assertions from OllamaAPIIntegrationTest.
This commit is contained in:
amithkoujalgi 2025-09-17 20:28:58 +05:30
parent b1d3ee54a5
commit a1b5756107
No known key found for this signature in database
GPG Key ID: E29A37746AF94B70
2 changed files with 5 additions and 9 deletions

View File

@ -33,7 +33,7 @@ integration-tests:
integration-tests-remote:
@echo "\033[0;34mRunning integration tests (remote)...\033[0m"
@export USE_EXTERNAL_OLLAMA_HOST=true && export OLLAMA_HOST=http://192.168.29.223:11434 && mvn clean verify -Pintegration-tests -Dgpg.skip=true
@export USE_EXTERNAL_OLLAMA_HOST=true && export OLLAMA_HOST=http://192.168.29.229:11434 && mvn clean verify -Pintegration-tests -Dgpg.skip=true
doxygen:
@echo "\033[0;34mGenerating documentation with Doxygen...\033[0m"

View File

@ -61,6 +61,9 @@ class OllamaAPIIntegrationTest {
Boolean.parseBoolean(System.getenv("USE_EXTERNAL_OLLAMA_HOST"));
String ollamaHost = System.getenv("OLLAMA_HOST");
useExternalOllamaHost = true;
ollamaHost ="http://192.168.29.229:11434/";
if (useExternalOllamaHost) {
LOG.info("Using external Ollama host...");
api = new OllamaAPI(ollamaHost);
@ -201,7 +204,7 @@ class OllamaAPIIntegrationTest {
@Test
@Order(6)
void testGennerateModelWithDefaultOptions()
void testGenerateModelWithDefaultOptions()
throws OllamaBaseException, IOException, InterruptedException, URISyntaxException {
api.pullModel(GENERAL_PURPOSE_MODEL);
boolean raw = false;
@ -665,7 +668,6 @@ class OllamaAPIIntegrationTest {
+ " Mona Lisa?")
.build();
requestModel.setThink(false);
StringBuffer sb = new StringBuffer();
OllamaChatResult chatResult =
api.chat(
@ -681,7 +683,6 @@ class OllamaAPIIntegrationTest {
assertNotNull(chatResult.getResponseModel());
assertNotNull(chatResult.getResponseModel().getMessage());
assertNotNull(chatResult.getResponseModel().getMessage().getContent());
assertEquals(sb.toString(), chatResult.getResponseModel().getMessage().getContent());
}
@Test
@ -703,7 +704,6 @@ class OllamaAPIIntegrationTest {
.withThinking(true)
.withKeepAlive("0m")
.build();
StringBuffer sb = new StringBuffer();
OllamaChatResult chatResult =
api.chat(
@ -720,10 +720,6 @@ class OllamaAPIIntegrationTest {
assertNotNull(chatResult.getResponseModel());
assertNotNull(chatResult.getResponseModel().getMessage());
assertNotNull(chatResult.getResponseModel().getMessage().getContent());
assertEquals(
sb.toString(),
chatResult.getResponseModel().getMessage().getThinking()
+ chatResult.getResponseModel().getMessage().getContent());
}
@Test