Example #1
0
func (t TestRunnerPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@tests", "TestRunner.Index", ""),
		revel.NewRoute("GET", "/@tests.list", "TestRunner.List", ""),
		revel.NewRoute("GET", "/@tests/public/{<.*>filepath}", "Static.ServeModule", "testrunner,public"),
		revel.NewRoute("GET", "/@tests/{suite}/{test}", "TestRunner.Run", ""),
	}, router.Routes...)
	fmt.Println("Go to /@tests to run the tests.")
}
Example #2
0
func (t TestRunnerPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@tests", "TestRunner.Index"),
		revel.NewRoute("GET", "/@tests.list", "TestRunner.List"),
		revel.NewRoute("GET", "/@tests/public/", "staticDir:testrunner:public"),
		revel.NewRoute("GET", "/@tests/{suite}/{test}", "TestRunner.Run"),
	}, router.Routes...)
	fmt.Println("Go to /@tests to run the tests.")
}
Example #3
0
func (t JobsPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@jobs", "Jobs.Status", ""),
	}, router.Routes...)
	fmt.Println("Go to /@jobs to see job status.")
}