Skip to content

Commit

Permalink
go/cmd/dolt: signed_commits_test.go: Try a different way to cleanup t…
Browse files Browse the repository at this point in the history
…he databases.
  • Loading branch information
reltuk committed Jan 28, 2025
1 parent 742f276 commit be448ee
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions go/cmd/dolt/commands/signed_commits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"testing"

"github.com/dolthub/dolt/go/cmd/dolt/cli"
"github.com/dolthub/dolt/go/libraries/doltcore/dbfactory"
"github.com/dolthub/dolt/go/libraries/doltcore/env"
"github.com/dolthub/dolt/go/libraries/utils/argparser"
"github.com/dolthub/dolt/go/libraries/utils/config"
Expand Down Expand Up @@ -78,6 +79,9 @@ func TestSignAndVerifyCommit(t *testing.T) {
ctx := context.Background()
importKey(t, ctx)
dbDir := setupTestDB(t, ctx, filesys.LocalFS)
t.Cleanup(func() {
dbfactory.CloseAllLocalDatabases()
})

global := map[string]string{
"user.name": "First Last",
Expand Down Expand Up @@ -141,12 +145,6 @@ func execCommand(ctx context.Context, t *testing.T, wd string, cmd cli.Command,
err = fmt.Errorf("error creating multi repo: %w", err)
return
}
t.Cleanup(func() {
mr.Iter(func(_ string, env *env.DoltEnv) (bool, error) {
env.DoltDB.Close()
return false, nil
})
})

latebind, verr := BuildSqlEngineQueryist(ctx, dEnv.FS, mr, &cli.UserPassword{}, apr)
if verr != nil {
Expand Down

0 comments on commit be448ee

Please sign in to comment.