Skip to content

remove global mocks for SearchContextsStore

Administrator requested to merge cc/remove-global-search-contexts-mock into main

Created by: camdencheek

This removes all references to the globaly mocked methods on SearchContextsStore, replacing all uses of them with injected mocks.

The footprint of the PR is a bit larger than I'd love because many of the search context mocks were also used in tests for repos, which required converting a bunch more dbutil.DB to database.DB in order to mock all the stores in the test.

The plan here is to do this same thing for each of the current mock stores, replacing dbutil.DB with database.DB as I go. This allows the effort to be a bit more incremental. Once all the mock stores are removed, I will go through and remove all the remaining uses of the constructors in database, pushing people to use the (database.DB).Repos() method to construct stores. Following that, I will remove dbutil.DB from the database.DB interface and remove database.NewDB().

Merge request reports

Loading