Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Mock does not use cassettes with HTTPoison #162

Open
dtip opened this issue Nov 9, 2020 · 2 comments
Open

Global Mock does not use cassettes with HTTPoison #162

dtip opened this issue Nov 9, 2020 · 2 comments

Comments

@dtip
Copy link

dtip commented Nov 9, 2020

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?

@surik
Copy link
Contributor

surik commented Nov 12, 2020

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

@dtip
Copy link
Author

dtip commented Nov 12, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants