Test: fix check for specifying include_type_name (#61059)

This commit fixes the version check for when to specify the
include_type_name request parameter in the FullClusterRestartIT test
that forces the creation of a system index in the old cluster. The
parameter only exists in 6.8, so we need to guard against sending the
parameter to pre-6.8 versions.
This commit is contained in:
Jay Modi 2020-08-12 13:23:57 -06:00 committed by GitHub
parent 910abeea2e
commit fb6f46936a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1496,7 +1496,7 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase {
// make sure .tasks index exists
assertBusy(() -> {
Request getTasksIndex = new Request("GET", "/.tasks");
if (isRunningAgainstAncientCluster()) {
if (getOldClusterVersion().onOrAfter(Version.V_6_8_0) && getOldClusterVersion().before(Version.V_7_0_0)) {
getTasksIndex.addParameter("include_type_name", "false");
}
assertThat(client().performRequest(getTasksIndex).getStatusLine().getStatusCode(), is(200));