How best to write integration tests with actix_web + diesel

#1

I’ve used actix_web and diesel (with r2d2 Pool) but I’m struggling to figure out a good readable integration test structure.

Partly of what I’ve been struggling with has been with how to get a connection from the pool used by the TestServer (of actix_web) to use in setup auxiliary functions (purely to setup/cleanup before running the api calls against TestServer).

Has anyone gone through this and has anyone found a good way to achieve this?

0 Likes