예제 #1
0
파일: main.go 프로젝트: sguzwf/vertex
func main() {
	vertex.ReadConfigs()

	logging.SetMinimalLevelByName(vertex.Config.Server.LoggingLevel)
	srv := vertex.NewServer(vertex.Config.Server.ListenAddr)
	srv.InitAPIs()
	if err := srv.Run(); err != nil {
		panic(err)
	}

}
예제 #2
0
파일: main.go 프로젝트: sguzwf/vertex
func main() {

	serverAddr := flag.String("server", "http://127.0.0.1:9947", "The server URL to connect to")
	apiName := flag.String("api", "", "The API we want to test")
	category := flag.String("category", "all", "The test category we want to run [all|critical|warning]")
	format := flag.String("format", "text", "Result Output Format [text|json]")

	logging.SetMinimalLevel(logging.CRITICAL)
	vertex.ReadConfigs()

	success := vertex.RunCLITest(*apiName, *serverAddr, *category, *format)
	if !success {
		fmt.Fprintln(os.Stderr, "Tests Failed")
		os.Exit(-1)
	}
	fmt.Println("PASS!")
}