Skip to content

Commit

Permalink
Use only JSON in REST tests (elastic#103895)
Browse files Browse the repository at this point in the history
A temporary fix for the broken tests while we iterate on something more
comprehensive in elastic#103880.

Closes elastic#103884
  • Loading branch information
DaveCTurner authored Jan 4, 2024
1 parent 785a0bf commit 3bd597c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2376,7 +2376,7 @@ public static void setIgnoredErrorResponseCodes(Request request, RestStatus... r
}

public static void addXContentBody(Request request, ToXContent body) throws IOException {
final var xContentType = randomFrom(XContentType.JSON, XContentType.CBOR, XContentType.YAML, XContentType.SMILE);
final var xContentType = XContentType.JSON;
final var bodyBytes = XContentHelper.toXContent(body, xContentType, EMPTY_PARAMS, randomBoolean());
request.setEntity(
new InputStreamEntity(
Expand Down

0 comments on commit 3bd597c

Please sign in to comment.