Delete superfluous UpdateRequest test
It was accidentally backported but doesn't belong on the 6.x branch.
Closes
@@ -33,7 +33,6 @@ import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentHelper;
-import org.elasticsearch.common.xcontent.XContentParseException;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.json.JsonXContent;
@@ -292,29 +291,6 @@ public class UpdateRequestTests extends ESTestCase {
assertThat(request.fields(), arrayContaining("field1", "field2"));
}
- @AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/31092")
- public void testUnknownFieldParsing() throws Exception {
- UpdateRequest request = new UpdateRequest("test", "type", "1");
- XContentParser contentParser = createParser(XContentFactory.jsonBuilder()
- .startObject()
- .field("unknown_field", "test")
- .endObject());
-
- XContentParseException ex = expectThrows(XContentParseException.class, () -> request.fromXContent(contentParser));
- assertEquals("[1:2] [UpdateRequest] unknown field [unknown_field], parser not found", ex.getMessage());
-
- UpdateRequest request2 = new UpdateRequest("test", "type", "1");
- XContentParser unknownObject = createParser(XContentFactory.jsonBuilder()
- .startObject()
- .field("script", "ctx.op = ctx._source.views == params.count ? 'delete' : 'none'")
- .startObject("params")
- .field("count", 1)
- .endObject()
- .endObject());
- ex = expectThrows(XContentParseException.class, () -> request2.fromXContent(unknownObject));
- assertEquals("[1:76] [UpdateRequest] unknown field [params], parser not found", ex.getMessage());
- }
-
public void testFetchSourceParsing() throws Exception {
UpdateRequest request = new UpdateRequest("test", "type1", "1");
request.fromXContent(createParser(XContentFactory.jsonBuilder()
