Fix server protocol response body assertion (#1141)
In server protocol tests, we were asserting that the returned server response body matched *exactly* the body field in the protocol tests. However, Smithy protocol tests are written with readability in mind, and as such this field contains formatted bodies with abundant spacing and newlines. For example: ``` Diff < left / right > : <"{\n \"stringValue\": \"string\",\n \"documentValue\": {\n \"foo\": \"bar\"\n }\n}" >b"{\"documentValue\":{\"foo\":\"bar\"},\"stringValue\":\"string\"}" ``` This commit changes the response body assertion to use `aws_smithy_protocol_test::validate_body`, a helper function that takes these formatting differences into account using the configured protocol test `bodyMediaType` field. This change makes many response protocol tests pass.
Loading
Please register or sign in to comment