MCPcopy Index your code
hub / github.com/dnote/dnote / TestMigrate_readDirError

Function TestMigrate_readDirError

pkg/server/database/migrate_test.go:208–219  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

206}
207
208func TestMigrate_readDirError(t *testing.T) {
209 db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
210 if err != nil {
211 t.Fatalf("failed to open database: %v", err)
212 }
213
214 // Use filesystem that fails on ReadDir
215 err = migrate(db, errorFS{})
216 if err == nil {
217 t.Fatal("expected error for ReadDir failure, got nil")
218 }
219}
220
221func TestMigrate_sqlError(t *testing.T) {
222 db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})

Callers

nothing calls this directly

Calls 2

migrateFunction · 0.85
OpenMethod · 0.80

Tested by

no test coverage detected