Skip to content

Commit f7d978f

Browse files
Fixing compile and test errors
1 parent 5c0b35d commit f7d978f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public void testInfer_ThrowsErrorWhenTaskTypeIsNotValid() throws IOException {
367367
var service = new ElasticInferenceService(
368368
factory,
369369
createWithEmptySettings(threadPool),
370-
new ElasticInferenceServiceComponents(null)
370+
new ElasticInferenceServiceComponents(null, ElasticInferenceServiceACLTests.createEnabledAcl())
371371
)
372372
) {
373373
PlainActionFuture<InferenceServiceResults> listener = new PlainActionFuture<>();
@@ -412,7 +412,7 @@ public void testInfer_ThrowsErrorWhenTaskTypeIsNotValid_ChatCompletion() throws
412412
var service = new ElasticInferenceService(
413413
factory,
414414
createWithEmptySettings(threadPool),
415-
new ElasticInferenceServiceComponents(null)
415+
new ElasticInferenceServiceComponents(null, ElasticInferenceServiceACLTests.createEnabledAcl())
416416
)
417417
) {
418418
PlainActionFuture<InferenceServiceResults> listener = new PlainActionFuture<>();
@@ -586,7 +586,9 @@ public void testHideFromConfigurationApi_ReturnsTrue_WithModelTaskTypesThatAreNo
586586

587587
public void testHideFromConfigurationApi_ReturnsFalse_WithAvailableModels() throws Exception {
588588
try (
589-
var service = createServiceWithMockSender(new ElasticInferenceServiceACL(Map.of("model-1", EnumSet.of(TaskType.COMPLETION))))
589+
var service = createServiceWithMockSender(
590+
new ElasticInferenceServiceACL(Map.of("model-1", EnumSet.of(TaskType.CHAT_COMPLETION)))
591+
)
590592
) {
591593
assertFalse(service.hideFromConfigurationApi());
592594
}
@@ -595,7 +597,7 @@ public void testHideFromConfigurationApi_ReturnsFalse_WithAvailableModels() thro
595597
public void testGetConfiguration() throws Exception {
596598
try (
597599
var service = createServiceWithMockSender(
598-
new ElasticInferenceServiceACL(Map.of("model-1", EnumSet.of(TaskType.SPARSE_EMBEDDING, TaskType.COMPLETION)))
600+
new ElasticInferenceServiceACL(Map.of("model-1", EnumSet.of(TaskType.SPARSE_EMBEDDING, TaskType.CHAT_COMPLETION)))
599601
)
600602
) {
601603
String content = XContentHelper.stripWhitespace("""

0 commit comments

Comments
 (0)