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 is possible, defining an API to set expectations and mocks on the server, but it would also mean that I need to execute the tests sequentially to make sure they don't interfere with each other.
-
-
If I spin them up programmatically instead, I can have a separate server for each test running on a random port and pass that as the address of the 3rd party API to my API via configuration. So all tests can run in parallel.
-
I think you can still do that with compose, it will pick a random port and expose the mapping in the API. However it gets heavyweight very fast. Maybe wrap the process in an actor and shutdown the system (gracefully) on test end?
- 1 more reply
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