Skip to content
Merged
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 @@ -400,6 +400,8 @@ public void testIndexPattern() throws Exception {

@SuppressWarnings("unchecked")
public void testStats() throws IOException {
assumeTrue("capabilities endpoint is not available", capabilitiesEndpointAvailable());

Request caps = new Request("GET", "_capabilities?method=GET&path=_cluster/stats&capabilities=esql-stats");
Response capsResponse = client().performRequest(caps);
Map<String, Object> capsResult = entityAsMap(capsResponse.getEntity());
Expand Down Expand Up @@ -439,6 +441,10 @@ private static boolean ccsMetadataAvailable() {
return Clusters.localClusterVersion().onOrAfter(Version.V_8_16_0);
}

private static boolean capabilitiesEndpointAvailable() {
return Clusters.localClusterVersion().onOrAfter(Version.V_8_15_0);
}

private static boolean includeCCSMetadata() {
return ccsMetadataAvailable() && randomBoolean();
}
Expand Down