diff options
Diffstat (limited to 'cmd/gotosocial/action/testrig/testrig.go')
-rw-r--r-- | cmd/gotosocial/action/testrig/testrig.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/gotosocial/action/testrig/testrig.go b/cmd/gotosocial/action/testrig/testrig.go index b5d34e7c9..13e9a8f5b 100644 --- a/cmd/gotosocial/action/testrig/testrig.go +++ b/cmd/gotosocial/action/testrig/testrig.go @@ -56,12 +56,14 @@ var Start action.GTSAction = func(ctx context.Context) error { return fmt.Errorf("error initializing tracing: %w", err) } - // Initialize caches - state.Caches.Init() + // Initialize caches and database + state.DB = testrig.NewTestDB(&state) + + // New test db inits caches so we don't need to do + // that twice, we can just start the initialized caches. state.Caches.Start() defer state.Caches.Stop() - state.DB = testrig.NewTestDB(&state) testrig.StandardDBSetup(state.DB, nil) if os.Getenv("GTS_STORAGE_BACKEND") == "s3" { |