When adding new data to inventory collections, it is easy to forget to update DataStore::inventory_delete_collection() to remove that new data, which leads to unbounded and quick growth of the new data (e.g., #5299). @smklein and @davepacheco at various times have both proposed a test roughly structured like:
- Create a snapshot of the database state (critically, this needs to include "potentially new tables that have been added since this test was written")
- Insert a collection
- Delete that collection
- Confirm that the database matches the snapshot taken in 1
When adding new data to inventory collections, it is easy to forget to update
DataStore::inventory_delete_collection()to remove that new data, which leads to unbounded and quick growth of the new data (e.g., #5299). @smklein and @davepacheco at various times have both proposed a test roughly structured like: