conf_test.go 396 B

1234567891011121314151617181920212223
  1. package conf
  2. import (
  3. "flag"
  4. "fmt"
  5. "testing"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func init() {
  9. flag.Set("conf", "../cmd/figure-timer-job-test.toml")
  10. }
  11. func TestInit(t *testing.T) {
  12. Convey("TEST conf", t, func() {
  13. err := Init()
  14. So(err, ShouldBeNil)
  15. So(Conf.Property, ShouldNotBeNil)
  16. So(Conf.Property.Calc, ShouldNotBeNil)
  17. fmt.Printf("%+v", Conf.Property.Calc)
  18. })
  19. }