Skip to content

Compare json object values instead of byte streams when matching bodies that are content-type json#8860

Merged
scbedd merged 7 commits intomainfrom
real-json-comparison
Aug 25, 2024
Merged

Compare json object values instead of byte streams when matching bodies that are content-type json#8860
scbedd merged 7 commits intomainfrom
real-json-comparison

Conversation

@scbedd
Copy link
Copy Markdown
Member

@scbedd scbedd commented Aug 20, 2024

Resolves #3171

@scbedd scbedd self-assigned this Aug 20, 2024
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordSession.cs
@scbedd
Copy link
Copy Markdown
Member Author

scbedd commented Aug 23, 2024

Located a hole in the logic where we don't properly handle when the body doesn't parse even when it's marked as json (this happens for deliberate error cases).

This test in java turned it up. Newest commit protects against the unexpected exception + resolves the test invocation locally.

@scbedd scbedd merged commit c597728 into main Aug 25, 2024
@scbedd scbedd deleted the real-json-comparison branch August 25, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[Test-Proxy] Custom matcher for body keys only

3 participants