exvcr icon indicating copy to clipboard operation
exvcr copied to clipboard

Global Mock does not use cassettes with HTTPoison

Open dtip opened this issue 4 years ago • 2 comments

Hi folks,

Just tried out the new global_mock option on a project using HTTPoison. Everything looked great at first with tests seeing a massive speedup.

However, it turns out with global_mock enabled the tests aren't actually using the cassettes. They're always making external HTTP requests instead.

I tried deleting the existing cassettes to see what would happen. Interestingly the cassettes are re-created, but each is just an empty list. The tests are all still passing because the data they need is being correctly fetched from the external HTTP requests.

Any idea what the problem is?

dtip avatar Nov 09 '20 12:11 dtip

Hi, @dtip is there a chance that I can take a look at the minimum test to debug it?

surik avatar Nov 12 '20 17:11 surik

Sorry @surik - don't have one and don't have time to make one. I realise that isn't helpful. We switched to Walkman - does what we need and no performance issues.

The code we were testing uses a pretty basic HTTP client with one call to HTTPoison.get/2. I guess that would be the starting point

dtip avatar Nov 12 '20 17:11 dtip