Skip to content

Commit 0c52529

Browse files
Assert the message in test
1 parent 6d58954 commit 0c52529

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,12 @@ public void testInvalidPatternsWithIntermittentQuotes() {
32323232
// Construct the new invalid index pattern.
32333233
var remoteIndexWithInvalidChar = quote(randomIdentifier() + ":" + "foo" + randomInvalidChar + "bar");
32343234
var query = "FROM " + randomIndex + "," + remoteIndexWithInvalidChar;
3235-
expectError(query, "must not contain the following characters [' ','\"',',','/','<','>','?','\\','|']");
3235+
expectError(
3236+
query,
3237+
"Invalid index name [foo"
3238+
+ randomInvalidChar
3239+
+ "bar], must not contain the following characters [' ','\"',',','/','<','>','?','\\','|']"
3240+
);
32363241
}
32373242

32383243
// Colon outside a quoted string should result in an ANTLR error: a comma is expected.

0 commit comments

Comments
 (0)