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

Work out how to use HMock with servant-client #15

Open
cdsmith opened this issue Jul 18, 2021 · 1 comment
Open

Work out how to use HMock with servant-client #15

cdsmith opened this issue Jul 18, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@cdsmith
Copy link
Owner

cdsmith commented Jul 18, 2021

servant-client generates actions that run directly in a ClientM monad. There should be some kind of story about the right way to integrate servant-client with HMock.

One idea is to write a new library, such as servant-classy-client, that uses TH to generate an MTL-style class from a servant API type.

Another idea is to generate a server implementation that delegates everything to mockMethod using withMockT, and then allow the tests to serialize everything but point them at an in-process HTTP server. So you'd expect the server methods, not the client methods. This requires generalizing Mockable a but so that it doesn't require an MTL-style class, but I want to do that anyway.

@cdsmith cdsmith added the enhancement New feature or request label Jul 18, 2021
@cdsmith
Copy link
Owner Author

cdsmith commented Jul 18, 2021

See #4

@cdsmith cdsmith added the help wanted Extra attention is needed label Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant