Skip to content

Commit 9a6b7e8

Browse files
committed
Add more test case (from #446)
Signed-off-by: Andriy Redko <[email protected]>
1 parent 85d566e commit 9a6b7e8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-data-opensearch/src/test/java/org/opensearch/data/client/core/index/DynamicTemplatesContextBaseTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ void shouldCreateDynamicTemplateOne() {
5656
}
5757

5858

59+
@Test
60+
void shouldCreateDynamicTemplateOneWithDot() {
61+
IndexOperations indexOperations = operations.indexOps(SampleDynamicTemplatesEntity.class);
62+
assertThat(indexOperations.createWithMapping()).isTrue();
63+
64+
operations.save(new SampleDynamicTemplatesEntity(Map.of("John.Jr", "Smith")));
65+
assertThat(operations.search(Query.findAll(), SampleDynamicTemplatesEntity.class).get().count()).isEqualTo(1L);
66+
}
67+
5968
@Test
6069
void shouldCreateDynamicTemplateTwo() {
6170
IndexOperations indexOperations = operations.indexOps(SampleDynamicTemplatesEntityTwo.class);

0 commit comments

Comments
 (0)