-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 branch information
1 parent
11c61f6
commit 907c0f3
Showing
1 changed file
with
31 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters