Add support for Elasticsearch 6.4.0
According to the release notes [1] there are several breaking changes, but none of them seem to affect Gerrit's integration. Update the version manager and adapter to recognize 6.4.* as a supported version, and modify the test container to use 6.4.0 for the V6 tests. Update the reindex and ssh index tests to also test against 6.4.0. [1] https://www.elastic.co/guide/en/elasticsearch/reference/current/release-notes-6.4.0.html Bug: Issue 9670 Change-Id: If0d16df1a719d45aad9c56409e14c8fcf3945bd5
This commit is contained in:
parent
f624784344
commit
df5992e2ad
@ -58,6 +58,11 @@ public class ElasticReindexIT extends AbstractReindexTests {
|
||||
return getConfig(ElasticVersion.V6_3);
|
||||
}
|
||||
|
||||
@ConfigSuite.Config
|
||||
public static Config elasticsearchV6_4() {
|
||||
return getConfig(ElasticVersion.V6_4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureIndex(Injector injector) throws Exception {
|
||||
ElasticTestUtils.createAllIndexes(injector);
|
||||
|
@ -55,6 +55,11 @@ public class ElasticIndexIT extends AbstractIndexTests {
|
||||
return getConfig(ElasticVersion.V6_3);
|
||||
}
|
||||
|
||||
@ConfigSuite.Config
|
||||
public static Config elasticsearchV6_4() {
|
||||
return getConfig(ElasticVersion.V6_4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureIndex(Injector injector) throws Exception {
|
||||
ElasticTestUtils.createAllIndexes(injector);
|
||||
|
@ -38,6 +38,7 @@ public class ElasticQueryAdapter {
|
||||
case V5_6:
|
||||
case V6_2:
|
||||
case V6_3:
|
||||
case V6_4:
|
||||
this.searchFilteringName = "_source";
|
||||
this.indicesExistParam = "?allow_no_indices=false";
|
||||
this.exactFieldType = "keyword";
|
||||
|
@ -21,7 +21,8 @@ public enum ElasticVersion {
|
||||
V2_4("2.4.*"),
|
||||
V5_6("5.6.*"),
|
||||
V6_2("6.2.*"),
|
||||
V6_3("6.3.*");
|
||||
V6_3("6.3.*"),
|
||||
V6_4("6.4.*");
|
||||
|
||||
private final String version;
|
||||
private final Pattern pattern;
|
||||
|
@ -51,6 +51,8 @@ public class ElasticContainer<SELF extends ElasticContainer<SELF>> extends Gener
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4";
|
||||
case V6_3:
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.2";
|
||||
case V6_4:
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.0";
|
||||
}
|
||||
throw new IllegalStateException("No tests for version: " + version.name());
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class ElasticV6QueryAccountsTest extends AbstractQueryAccountsTest {
|
||||
return;
|
||||
}
|
||||
|
||||
container = ElasticContainer.createAndStart(ElasticVersion.V6_3);
|
||||
container = ElasticContainer.createAndStart(ElasticVersion.V6_4);
|
||||
nodeInfo = new ElasticNodeInfo(container.getHttpHost().getPort());
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class ElasticV6QueryChangesTest extends AbstractQueryChangesTest {
|
||||
return;
|
||||
}
|
||||
|
||||
container = ElasticContainer.createAndStart(ElasticVersion.V6_3);
|
||||
container = ElasticContainer.createAndStart(ElasticVersion.V6_4);
|
||||
nodeInfo = new ElasticNodeInfo(container.getHttpHost().getPort());
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class ElasticV6QueryGroupsTest extends AbstractQueryGroupsTest {
|
||||
return;
|
||||
}
|
||||
|
||||
container = ElasticContainer.createAndStart(ElasticVersion.V6_3);
|
||||
container = ElasticContainer.createAndStart(ElasticVersion.V6_4);
|
||||
nodeInfo = new ElasticNodeInfo(container.getHttpHost().getPort());
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,9 @@ public class ElasticVersionTest {
|
||||
|
||||
assertThat(ElasticVersion.forVersion("6.3.0")).isEqualTo(ElasticVersion.V6_3);
|
||||
assertThat(ElasticVersion.forVersion("6.3.1")).isEqualTo(ElasticVersion.V6_3);
|
||||
|
||||
assertThat(ElasticVersion.forVersion("6.4.0")).isEqualTo(ElasticVersion.V6_4);
|
||||
assertThat(ElasticVersion.forVersion("6.4.1")).isEqualTo(ElasticVersion.V6_4);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user