Testing ASP Core apps
Prompted by $WORK, it's time to look properly at how to do end-to-end testing of ASP Core apps. I'm going to use Webmail as my example, mostly because it's got at least one heavy runtime dependency (dovecot).
My understanding of modern practice is that I should be running my test in a container, or possibly more than one:
- The app itself
- Dependencies (dovecot here)
- The test runner
Running in containers gives me a known starting state every time, assuing I can get my containers setup right.
Having said that - I've got most of the script to build the machine anyway, is it going to add much more to the runtime to spend an extra 10 seconds starting a VM compared to a container? I suppose it depends on how long the tests take to run.
More data: Podman runs on WSL!
OK, time to write some Containerfiles.