Skip to content

Commit 926b705

Browse files
committed
integration test
1 parent a47e00f commit 926b705

File tree

1 file changed

+18
-4
lines changed
  • x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action

1 file changed

+18
-4
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionIT.java

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,13 +1217,27 @@ public void testOverlappingIndexPatterns() throws Exception {
12171217
}
12181218

12191219
public void testErrorMessageForUnknownColumn() {
1220-
var e = expectThrows(VerificationException.class, () -> run("row a = 1 | eval x = b"));
1221-
assertThat(e.getMessage(), containsString("Unknown column [b]"));
1220+
expectThrows(VerificationException.class, containsString("Unknown column [b]"), () -> run("row a = 1 | eval x = b"));
12221221
}
12231222

12241223
public void testErrorMessageForEmptyParams() {
1225-
var e = expectThrows(ParsingException.class, () -> run("row a = 1 | eval x = ?"));
1226-
assertThat(e.getMessage(), containsString("Not enough actual parameters 0"));
1224+
expectThrows(ParsingException.class, containsString("Not enough actual parameters 0"), () -> run("row a = 1 | eval x = ?"));
1225+
}
1226+
1227+
public void testErrorMessageForUnknownIndex() {
1228+
expectThrows(
1229+
VerificationException.class,
1230+
containsString("Unknown index [no-such-index]"),
1231+
() -> run("from no-such-index", randomPragmas(), null, randomBoolean())
1232+
);
1233+
}
1234+
1235+
public void testErrorMessageForUnknownIndexInPatternList() {
1236+
expectThrows(
1237+
VerificationException.class,
1238+
containsString("Unknown index [no-such-index]"),
1239+
() -> run("from test,no-such-index", randomPragmas(), null, randomBoolean())
1240+
);
12271241
}
12281242

12291243
public void testEmptyIndex() {

0 commit comments

Comments
 (0)