diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java index 8719e6157ae07..53b2fdc329387 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java @@ -10,6 +10,7 @@ import org.elasticsearch.Build; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.esql.VerificationException; +import org.elasticsearch.xpack.esql.action.EsqlCapabilities; import org.elasticsearch.xpack.esql.core.type.DataType; import org.elasticsearch.xpack.esql.parser.EsqlParser; import org.elasticsearch.xpack.esql.parser.QueryParam; @@ -663,6 +664,7 @@ public void testMatchFilter() throws Exception { } public void testMatchCommand() throws Exception { + assumeTrue("skipping because MATCH_COMMAND is not enabled", EsqlCapabilities.Cap.MATCH_COMMAND.isEnabled()); assertEquals("1:24: MATCH cannot be used after LIMIT", error("from test | limit 10 | match \"Anna\"")); assertEquals("1:13: MATCH cannot be used after SHOW", error("show info | match \"8.16.0\"")); assertEquals("1:17: MATCH cannot be used after ROW", error("row a= \"Anna\" | match \"Anna\"")); diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java index 1e81738a1c7ef..e477878106611 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java @@ -25,6 +25,7 @@ import org.elasticsearch.xpack.core.enrich.EnrichPolicy; import org.elasticsearch.xpack.esql.EsqlTestUtils; import org.elasticsearch.xpack.esql.EsqlTestUtils.TestSearchStats; +import org.elasticsearch.xpack.esql.action.EsqlCapabilities; import org.elasticsearch.xpack.esql.analysis.Analyzer; import org.elasticsearch.xpack.esql.analysis.AnalyzerContext; import org.elasticsearch.xpack.esql.analysis.EnrichResolution; @@ -384,6 +385,7 @@ public void testMultiCountAllWithFilter() { * \_EsQueryExec[test], indexMode[standard], query[{"query_string":{"query":"\"last_name: Smith\"" */ public void testMatchCommand() { + assumeTrue("skipping because MATCH_COMMAND is not enabled", EsqlCapabilities.Cap.MATCH_COMMAND.isEnabled()); var plan = plannerOptimizer.plan(""" from test | match "last_name: Smith" @@ -412,6 +414,7 @@ public void testMatchCommand() { * }] */ public void testMatchCommandWithWhereClause() { + assumeTrue("skipping because MATCH_COMMAND is not enabled", EsqlCapabilities.Cap.MATCH_COMMAND.isEnabled()); var plan = plannerOptimizer.plan(""" from test | where emp_no > 10010 @@ -444,6 +447,7 @@ public void testMatchCommandWithWhereClause() { * sort[[FieldSort[field=emp_no{f}#3, direction=ASC, nulls=LAST]]] */ public void testMatchCommandWithMultipleMatches() { + assumeTrue("skipping because MATCH_COMMAND is not enabled", EsqlCapabilities.Cap.MATCH_COMMAND.isEnabled()); var plan = plannerOptimizer.plan(""" from test | match "last_name: Smith"