I’ve written a utility library, tmp-proc to simplify the use of dockerized
backends from Haskell integration tests.
At its core, it shells out to a series of docker commands that bracket test runs, but its API is organized to make it simple from integration test code to
- launch multiple services on docker during test setup
- connect those services to a WAI server being tested
- connect to the launched services to query their state during a test
- teardown the launched services on test completion
This is all done extensibly, and fits in well with setup/teardown hooks in testing libraries like hspec and tasty et al, so it should be both easy to use and customize.
Interested ? Please try out tmp-proc and let me know what you think.