Skip to content

Commit d07d27e

Browse files
authored
add test (#81634)
add a xcontent filter test that will failed, when random to `filterOnParser`. The test will fixed when jackson upgrade in #80160
1 parent 26c2ce0 commit d07d27e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/framework/src/main/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,17 @@ public void testManyFilters() throws IOException, URISyntaxException {
456456
testFilter(deep, deep, manyFilters, emptySet());
457457
}
458458
}
459+
460+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/pull/80160")
461+
public void testExcludeWildCardFields() throws IOException {
462+
Builder sample = builder -> builder.startObject()
463+
.startObject("include")
464+
.field("field1", "v1")
465+
.field("field2", "v2")
466+
.endObject()
467+
.field("include2", "vv2")
468+
.endObject();
469+
Builder expected = builder -> builder.startObject().startObject("include").field("field1", "v1").endObject().endObject();
470+
testFilter(expected, sample, singleton("include"), singleton("*.field2"));
471+
}
459472
}

0 commit comments

Comments
 (0)