Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ public void testResolvesDataStream() {
try (var response = run(syncEsqlQueryRequest("FROM data-stream-1"))) {
assertOk(response);
}
try (var response = run(syncEsqlQueryRequest("FROM data-stream-1::data"))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be applied to all kinds of indices?
In case, maybe we can randomize some of our existing tests (conditionally adding ::data), that already validate the query output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be applicable to data streams. The rest should result in not found. I should probably add some cases for that

assertOk(response);
}
expectThrows(
org.elasticsearch.xpack.esql.parser.ParsingException.class,
containsString("Invalid index name [data-stream-1::fake]"),
() -> run(syncEsqlQueryRequest("FROM data-stream-1::fake"))
);
expectThrows(
VerificationException.class,
containsString("Unknown index [no-such-data-stream::data]"),
() -> run(syncEsqlQueryRequest("FROM no-such-data-stream::data"))
);
}

public void testResolvesPattern() {
Expand Down