Replies: 2 comments 1 reply
-
As a comparison/alternative, my GCP PR does it with httptest. I think one default I'd give to something like go-vcr is that we have data in another file, when we could have everything in the same test file (and only create fixtures for things that are big and would clutter the test file). |
Beta Was this translation helpful? Give feedback.
-
i've not come across this tool so thanks for the suggestion! moving to a discussion for now, since nothing directly to action here. |
Beta Was this translation helpful? Give feedback.
-
dnaeon/go-vcr
is a library that aids testing API interactions by recording API responses and replaying them in subsequent executions.As I expect this tool to heavily rely on Cloud Providers API responses at testing, this may be a great addition to lower the complexity of writing tests by reducing the need for manual mocking.
I've been using is in elastic-agent-changelog-tool if you want to observe it's usage (here the wrapper and here an usage example). The tool interacts with GitHub APIs and go-vcr has been painless to integrate and helpful during development.
Beta Was this translation helpful? Give feedback.
All reactions