Fix failing test introduced in #59601

This commit is contained in:
David Turner 2020-07-15 17:43:33 +01:00
parent b8d73a1e7e
commit 67e7c3f60e
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ public class RestoreSnapshotRequestTests extends AbstractWireSerializingTestCase
public void testSource() throws IOException { public void testSource() throws IOException {
RestoreSnapshotRequest original = createTestInstance(); RestoreSnapshotRequest original = createTestInstance();
original.snapshotUuid(null); // cannot be set via the REST API
XContentBuilder builder = original.toXContent(XContentFactory.jsonBuilder(), new ToXContent.MapParams(Collections.emptyMap())); XContentBuilder builder = original.toXContent(XContentFactory.jsonBuilder(), new ToXContent.MapParams(Collections.emptyMap()));
XContentParser parser = XContentType.JSON.xContent().createParser( XContentParser parser = XContentType.JSON.xContent().createParser(
NamedXContentRegistry.EMPTY, null, BytesReference.bytes(builder).streamInput()); NamedXContentRegistry.EMPTY, null, BytesReference.bytes(builder).streamInput());