bilibili-backup/app/service/ep/saga-agent/conf/conf_test.go
2019-04-22 02:59:20 +00:00

31 lines
433 B
Go

package conf
import (
"flag"
"fmt"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func showConf() {
for _, v := range Conf.Runner {
fmt.Println(v.URL, v.Token)
}
}
func init() {
var err error
flag.Set("conf", "../service/agent/runners.toml")
if err = Init(); err != nil {
panic(err)
}
showConf()
}
func TestConf(t *testing.T) {
Convey("test conf", t, func() {
So(Conf.Runner, ShouldNotBeEmpty)
})
}