Skip to content

Commit aee9c19

Browse files
committed
Add TEXT_EMBEDDING_FUNCTION capability to EsqlSpecTestCase::requiresInferenceEndpoint
1 parent 5f00667 commit aee9c19

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.RERANK;
7878
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.SEMANTIC_TEXT_FIELD_CAPS;
7979
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.SOURCE_FIELD_MAPPING;
80+
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.TEXT_EMBEDDING_FUNCTION;
8081
import static org.hamcrest.Matchers.anyOf;
8182
import static org.hamcrest.Matchers.is;
8283
import static org.hamcrest.Matchers.nullValue;
@@ -251,8 +252,12 @@ protected boolean supportsInferenceTestService() {
251252
}
252253

253254
protected boolean requiresInferenceEndpoint() {
254-
return Stream.of(SEMANTIC_TEXT_FIELD_CAPS.capabilityName(), RERANK.capabilityName(), COMPLETION.capabilityName())
255-
.anyMatch(testCase.requiredCapabilities::contains);
255+
return Stream.of(
256+
SEMANTIC_TEXT_FIELD_CAPS.capabilityName(),
257+
RERANK.capabilityName(),
258+
COMPLETION.capabilityName(),
259+
TEXT_EMBEDDING_FUNCTION.capabilityName()
260+
).anyMatch(testCase.requiredCapabilities::contains);
256261
}
257262

258263
protected boolean supportsIndexModeLookup() throws IOException {

0 commit comments

Comments
 (0)