Skip to content

move the dbmock package into internal/database

Warren Gifford requested to merge cc/move-dbmock-to-database into main

Created by: camdencheek

I had originally created the dbmock package as a separate package because I thought it provided a nicely readable import path (dbmock.NewMockDB), and also because it provided a clean separation between mocks and the code being mocked. However, this meant that we couldn't use the dbmock package in the database package, which has been blocking me from getting rid of global mocks entirely.

This just moves the mocks into the database package, so now you'd use it like database.NewMockDB(), which is maybe actually better IMO because it corresponds directly to the database.NewDB() function.

Merge request reports

Loading