config_test.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package archive
  2. import (
  3. "context"
  4. _ "github.com/go-sql-driver/mysql"
  5. . "github.com/smartystreets/goconvey/convey"
  6. "testing"
  7. )
  8. func Test_RoundEndConf(t *testing.T) {
  9. var (
  10. c = context.TODO()
  11. err error
  12. )
  13. Convey("RoundEndConf", t, WithDao(func(d *Dao) {
  14. _, err = d.RoundEndConf(c)
  15. So(err, ShouldBeNil)
  16. }))
  17. }
  18. func Test_FansConf(t *testing.T) {
  19. var (
  20. c = context.TODO()
  21. err error
  22. sub int64
  23. )
  24. Convey("FansConf", t, WithDao(func(d *Dao) {
  25. sub, err = d.FansConf(c)
  26. So(err, ShouldBeNil)
  27. So(sub, ShouldNotBeEmpty)
  28. }))
  29. }
  30. func Test_RoundTypeConf(t *testing.T) {
  31. var (
  32. c = context.TODO()
  33. err error
  34. sub map[int16]struct{}
  35. )
  36. Convey("RoundTypeConf", t, WithDao(func(d *Dao) {
  37. sub, err = d.RoundTypeConf(c)
  38. So(err, ShouldBeNil)
  39. So(sub, ShouldNotBeNil)
  40. }))
  41. }
  42. func Test_AuditTypesConf(t *testing.T) {
  43. var (
  44. c = context.TODO()
  45. err error
  46. sub map[int16]struct{}
  47. )
  48. Convey("AuditTypesConf", t, WithDao(func(d *Dao) {
  49. sub, err = d.AuditTypesConf(c)
  50. So(err, ShouldBeNil)
  51. So(sub, ShouldNotBeNil)
  52. }))
  53. }
  54. func Test_ThresholdConf(t *testing.T) {
  55. var (
  56. c = context.TODO()
  57. err error
  58. sub map[int16]int
  59. )
  60. Convey("ThresholdConf", t, WithDao(func(d *Dao) {
  61. sub, err = d.ThresholdConf(c)
  62. So(err, ShouldBeNil)
  63. So(sub, ShouldNotBeNil)
  64. }))
  65. }