Skip to content

Commit

Permalink
Restore GeoShapeWithDocValuesFieldMapperTests v7 test (elastic#119147)
Browse files Browse the repository at this point in the history
This test was removed with elastic#112570 but needs to be added back with the
read-only support for v7 indices.
  • Loading branch information
cbuescher authored Dec 19, 2024
1 parent 9167db4 commit 74f37d1
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ public void testDefaultConfiguration() throws IOException {
assertTrue(fieldType.hasDocValues());
}

public void testDefaultDocValueConfigurationOnPre7_8() throws IOException {
IndexVersion oldVersion = IndexVersionUtils.randomVersionBetween(random(), IndexVersions.V_7_0_0, IndexVersions.V_7_7_0);
DocumentMapper defaultMapper = createDocumentMapper(oldVersion, fieldMapping(this::minimalMapping));
Mapper fieldMapper = defaultMapper.mappers().getMapper(FIELD_NAME);
assertThat(fieldMapper, instanceOf(fieldMapperClass()));

GeoShapeWithDocValuesFieldMapper geoShapeFieldMapper = (GeoShapeWithDocValuesFieldMapper) fieldMapper;
assertFalse(geoShapeFieldMapper.fieldType().hasDocValues());
}

/**
* Test that orientation parameter correctly parses
*/
Expand Down

0 comments on commit 74f37d1

Please sign in to comment.