Verifying pact with in-memory API
See original GitHub issueHi! Is it possible to verify pact with in-memory version of the API? As I can found in the previous version of the README, previously we can pass to ServiceProvider custom HTTP client or in-memory HTTP client (for ex. with OWIN). Now in current version I can see that you have removed to support for Microsoft.Owin.Testing. And it says that “You will now be required to start the API and listen on the correct port, as part of the test.” and we can pass only URI to the ServiceProvider. Does it mean that now I can run tests and verify pact only on the really deployed API application (locally or on any environment) and not using in-memory?
Because when I’m trying to verify pact with in-memory API and pass in-memory URI to the provider I got the error like:
Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 80
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top GitHub Comments
Thanks for the answer @mefellows! It is unfortunate that there is no such possibility. In-memory API provides more flexibility for testing strategy including Pact tests.
Maybe you have some plans to implement it in the nearest future?
The example above is the correct way to host your API so that the external Ruby process can call it. It’s worth noting that’s not an im-memory server though, it’s hosting on a real port and served on
localhost
.