Skip to content

Commit e975500

Browse files
committed
Fix broken tests
1 parent faca63f commit e975500

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/action/elastic/ElasticInferenceServiceActionCreatorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void testExecute_ReturnsSuccessfulResponse_ForElserAction() throws IOExce
124124
assertThat(requestMap.get("input"), instanceOf(List.class));
125125
var inputList = (List<String>) requestMap.get("input");
126126
assertThat(inputList, contains("hello world"));
127-
assertThat(requestMap.get("model_id"), is("my-model-id"));
127+
assertThat(requestMap.get("model"), is("my-model-id"));
128128
}
129129
}
130130

@@ -179,7 +179,7 @@ public void testSend_FailsFromInvalidResponseFormat_ForElserAction() throws IOEx
179179
assertThat(requestMap.get("input"), instanceOf(List.class));
180180
var inputList = (List<String>) requestMap.get("input");
181181
assertThat(inputList, contains("hello world"));
182-
assertThat(requestMap.get("model_id"), is("my-model-id"));
182+
assertThat(requestMap.get("model"), is("my-model-id"));
183183
}
184184
}
185185

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public void testInfer_SendsEmbeddingsRequest() throws IOException {
504504
assertThat(request.getHeader(HttpHeaders.CONTENT_TYPE), Matchers.equalTo(XContentType.JSON.mediaType()));
505505

506506
var requestMap = entityAsMap(request.getBody());
507-
assertThat(requestMap, is(Map.of("input", List.of("input text"), "model_id", "my-model-id", "usage_context", "search")));
507+
assertThat(requestMap, is(Map.of("input", List.of("input text"), "model", "my-model-id", "usage_context", "search")));
508508
}
509509
}
510510

@@ -562,7 +562,7 @@ public void testChunkedInfer_PassesThrough() throws IOException {
562562
);
563563

564564
var requestMap = entityAsMap(webServer.requests().get(0).getBody());
565-
assertThat(requestMap, is(Map.of("input", List.of("input text"), "model_id", "my-model-id", "usage_context", "ingest")));
565+
assertThat(requestMap, is(Map.of("input", List.of("input text"), "model", "my-model-id", "usage_context", "ingest")));
566566
}
567567
}
568568

0 commit comments

Comments
 (0)