Description
The latest minor version update contained a breaking change in the NewAsMode
function.
go-vcr/v2/recorder/recorder.go
Lines 193 to 198 in 6bd2f2d
In the previous version we were using (v.2.0.1
), this function just created an empty cassette if there was no cassette file found with the given name. With v2.1.0
this behavior changed and calling NewAsMode
using ModeReplaying
in combination with a non-existing cassette filename returns an error.
Especially in test scenarios where the recorder is just setup in a SetupTest
method for all tests, independent of whether all test methods execute an outgoing http call, this is an undesired behavior.
Could we get this function backwards compatible by introducing a flag which defines whether a missing cassette file should return an error?
Thanks in advance!
Activity