niconico:Blog

about
  • Testing with setup and teardown with async rust

    I have recently started to follow Luca Palmieri's "Zero to production" book. Quite early on in the book is the section about testing. The tests being presented are integration tests where each tests gets its own database instance. However, The book does not go into deleting the testing databases. this is not a bad decision but it was still bothering me that some unused resources were not freed. So I decided to program a setup/teardown system and went down on a little journey.