ElasticQueryAdapter: Move isV6 method to ElasticVersion and simplify
Move isV6 to ElasticVersion and simplify it to make it work with all future 6.x versions, ratehr than being hard-coded to 6.2 and 6.3. Add a test. Change-Id: Ibd17a45ebbcbbc8edcd37c8aec37090d878ebdf4
This commit is contained in:
@@ -46,4 +46,11 @@ public class ElasticVersionTest {
|
||||
"Invalid version: [4.0.0]. Supported versions: " + ElasticVersion.supportedVersions());
|
||||
ElasticVersion.forVersion("4.0.0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void version6() throws Exception {
|
||||
assertThat(ElasticVersion.V6_2.isV6()).isTrue();
|
||||
assertThat(ElasticVersion.V6_3.isV6()).isTrue();
|
||||
assertThat(ElasticVersion.V5_6.isV6()).isFalse();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user