go-common/app/admin/main/block/conf/conf_test.go
2019-04-22 02:59:20 +00:00

33 lines
668 B
Go

package conf
import (
"flag"
"os"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestMain(m *testing.M) {
defer os.Exit(0)
flag.Set("conf", "../cmd/block-admin-test.toml")
var err error
if err = Init(); err != nil {
panic(err)
}
m.Run()
}
func TestConf(t *testing.T) {
Convey("conf", t, func() {
So(Conf.Property.MSG, ShouldNotBeNil)
So(Conf.Property.MSG.BlackHouseForever, ShouldNotBeNil)
So(Conf.Property.MSG.BlackHouseLimit, ShouldNotBeNil)
So(Conf.Property.MSG.BlockRemove, ShouldNotBeNil)
So(Conf.Property.MSG.SysForever, ShouldNotBeNil)
So(Conf.Property.MSG.SysLimit, ShouldNotBeNil)
t.Log(Conf.Property.MSG)
})
}