check for cancelled context when in replay mode
vangent opened this issue · comments
Robert van Gent commented
I have a test that calls an API that makes HTTP requests underneath with a canceled context.
When in "record" mode, the API (correctly) returns an error, and no HTTP request is made (so, nothing is added to the cassette).
However, when in "replay" mode, go-vcr doesn't check the context, so it ends up looking for the HTTP request in the cassette, and returning either some other matching HTTP request, or a "not found" error.
It would be a truer replay experience if the replay mode checked the context.