-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make debugging unmatched requests easier #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Thank you for the contribution. This idea looks good overall, but PR needs some changes to get it through
- please make diff printing functionality to be optional, with
VCRMiddleware
method named likewith_rich_diff
turning it on - please use
tracing::info!
macro to print diff instead ofeprintln!()
, so output can be managed byRUST_LOG
environment configs - please add integration test that has unmatched request sent, and verifies the diff is printed in correct form (can use
tracing-test
https://github.com/dbrgn/tracing-test library to capture what is being printed in tests).
Thanks in advance!
Thanks for the review! I'm currently trying to make a deadline, but I'll give this a pass in a few weeks if that's ok :) |
Yeah that's fine for sure, follow up on your discretion I am always open for review! |
Ok, I've made an initial pass at implementing the suggestions! Some notes:
Let me know what you think :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Released 0.2.1 version with changes: https://crates.io/crates/rvcr/0.2.1 |
Nice, thank you! |
Hey, thanks for the great library! I added some print statements in my fork because I found it cumbersome to debug failing tests. I can hide this logic behind a flag or something if you're interested in merging this PR