bilibili-backup/app/service/main/antispam/dao/mysql_test.go

29 lines
500 B
Go
Raw Normal View History

2019-04-22 10:59:20 +08:00
package dao
import (
"context"
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDaoPingMySQL(t *testing.T) {
var (
c = context.TODO()
)
convey.Convey("PingMySQL", t, func(ctx convey.C) {
err := PingMySQL(c)
ctx.Convey("Then err should be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
})
})
}
func TestDaoClose(t *testing.T) {
convey.Convey("Close", t, func(ctx convey.C) {
Close()
ctx.Convey("No return values", func(ctx convey.C) {
})
})
}