dnaeon / go-vcr

Record and replay your HTTP interactions for fast, deterministic and accurate tests
BSD 2-Clause "Simplified" License
1.26k stars 78 forks source link

Add BlockRealTransportUnsafeMethods #100

Closed fornellas-udemy closed 3 months ago

fornellas-udemy commented 4 months ago

For cases where we're running read-only tests, it is useful to have some extra guardrails to enforce that.

This PR introduces the BlockRealTransportUnsafeMethods option, which, when set to true, prevents any unsafe method from reaching RealTransport.

PS: having a new tag on merge like on #99 would be appreciated :-D

dnaeon commented 3 months ago

Thanks!