dao_test.go 421 B

123456789101112131415161718192021222324252627
  1. package medal
  2. import (
  3. "flag"
  4. "path/filepath"
  5. "testing"
  6. "go-common/app/job/main/usersuit/conf"
  7. _ "github.com/go-sql-driver/mysql"
  8. . "github.com/smartystreets/goconvey/convey"
  9. )
  10. var d *Dao
  11. func init() {
  12. dir, _ := filepath.Abs("../cmd/convey-test.toml")
  13. flag.Set("conf", dir)
  14. conf.Init()
  15. d = New(conf.Conf)
  16. }
  17. func Test_Close(t *testing.T) {
  18. Convey("should return err be nil", t, func() {
  19. d.Close()
  20. })
  21. }