services/explorer/testutil/newtestenv.go
Function NewTestEnvDB
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func NewTestEnvDB(ctx context.Context, t *testing.T, handler metrics.Handler) (db db.ConsumerDB, eventDB scribedb.EventDB, gqlClient *client.Client, logIndex atomic.Int64, cleanup func(), testBackend backends.SimulatedTestBackend, deployManager *DeployManager) {
t.Helper()
dbPath := filet.TmpDir(t, "")
sqliteStore, err := sqlite.NewSqliteStore(ctx, dbPath, handler, false)