Looking for some @rustlang help.
How can I spin up a bunch of web servers (e.g. an actix-web app) at the beginning of a test, run the test logic and then shut down the server when the test ends?
That's super interesting! I was also looking at https://github.com/pingcap/failpoint … from PingCap. But that's step 2 for me - step 1: if this 3rd party API call returns this HTTP response when prompted with this request and I ask my API to perform this command, does it work as expected?
-
-
I can "mock" the piece of code that is interacting with the 3rd part API by defining a trait and using a mock impl, but then it's indeed not a black box test anymore and I am not exercising all the HTTP handling code that I have there. To do so, I need to spin a mock server.
-
If I get your use case correctly. It is not necessarily needed to spin up a webserver. But for real-world scenario tests you can do that. There are two options I can suggest: 1- Use Quickcheck-like framework and write a parameterized mock implementation and make it into [1/n]
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Writing about stuff to learn how it works, mostly in Rust.
Lead Engineer at