multi: rename chan DB Open method to OpenForTesting

This commit is contained in:
Elle Mouton
2024-11-26 12:31:38 +02:00
parent 4089fbcb44
commit 439a6c7d6c
24 changed files with 101 additions and 331 deletions

View File

@@ -17,19 +17,10 @@ import (
func createTestMessageStore(t *testing.T) *MessageStore {
t.Helper()
db, err := channeldb.Open(t.TempDir())
if err != nil {
t.Fatalf("unable to open db: %v", err)
}
t.Cleanup(func() {
db.Close()
})
db := channeldb.OpenForTesting(t, t.TempDir())
store, err := NewMessageStore(db)
if err != nil {
t.Fatalf("unable to initialize message store: %v", err)
}
require.NoError(t, err)
return store
}