mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Add unit test for searching
This commit is contained in:
@@ -70,3 +70,11 @@ func GetDB() *gorm.DB {
|
||||
func IsReady() bool {
|
||||
return ready
|
||||
}
|
||||
|
||||
func Close() error {
|
||||
sqlDB, err := db.DB()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return sqlDB.Close()
|
||||
}
|
||||
|
@@ -104,8 +104,6 @@ func TestTag(t *testing.T) {
|
||||
assert.Nil(t, tag6.AliasOf)
|
||||
|
||||
// cleanup
|
||||
d, err := db.DB()
|
||||
assert.Nil(t, err)
|
||||
_ = d.Close()
|
||||
_ = Close()
|
||||
_ = os.Remove("test.db")
|
||||
}
|
||||
|
Reference in New Issue
Block a user