Skip to content

clean up some unnecessary uses of dbtest.NewDB

Administrator requested to merge cc/clean-up-some-newdb into main

Created by: camdencheek

There are a significant number of uses of dbtest.NewDB() in tests that mock out all interactions with the database. When we don't actually need a database, it's considerably more performant to use a mock database since it doesn't need to copy the schema to create the database.

This PR targets a few of these tests and converts them to the new mock database style. As a bonus to having more isolated tests, this also significantly speeds up these tests. Think like 2s -> .02s for tests in packages that no longer need to call dbtest.NewDB().

Merge request reports

Loading