mysql_test.go 500 B

12345678910111213141516171819202122232425262728
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoPingMySQL(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. )
  11. convey.Convey("PingMySQL", t, func(ctx convey.C) {
  12. err := PingMySQL(c)
  13. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  14. ctx.So(err, convey.ShouldBeNil)
  15. })
  16. })
  17. }
  18. func TestDaoClose(t *testing.T) {
  19. convey.Convey("Close", t, func(ctx convey.C) {
  20. Close()
  21. ctx.Convey("No return values", func(ctx convey.C) {
  22. })
  23. })
  24. }