Documentation ¶ Index ¶ func New(t *testing.T) (*gorm.DB, func()) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(t *testing.T) (*gorm.DB, func()) New creates a new test database and returns a cleanup function. Please note that a caller needs to import "gorm.io/driver/sqlite"; to avoid "gorm.io/driver/sqlite" being in caller's realse, need to manually import it by *_test.go files only. Types ¶ This section is empty. Source Files ¶ View all Source files testdb.go Click to show internal directories. Click to hide internal directories.