conf_test.go 452 B

12345678910111213141516171819202122232425262728
  1. package conf
  2. import (
  3. "flag"
  4. "os"
  5. "testing"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestMain(m *testing.M) {
  9. defer os.Exit(0)
  10. flag.Set("conf", "../cmd/block-job-test.toml")
  11. var err error
  12. if err = Init(); err != nil {
  13. panic(err)
  14. }
  15. m.Run()
  16. }
  17. func TestConf(t *testing.T) {
  18. Convey("conf", t, func() {
  19. So(Conf.Property.MSG, ShouldNotBeNil)
  20. So(Conf.Property.MSG.BlockRemove, ShouldNotBeNil)
  21. t.Log(Conf.Property.MSG)
  22. })
  23. }