test(ping): add testing for gRPC

This commit is contained in:
Bo-Yi.Wu
2022-08-22 21:35:56 +08:00
committed by Jason Song
parent 9b4eb5f497
commit c10414a018
5 changed files with 94 additions and 2 deletions

View File

@ -24,7 +24,7 @@ func gRPCRouter(r *web.Route, fn grpc.RouteFn) {
r.Post(p+"{name}", grpcHandler(h))
}
func Routes(r *web.Route) {
func Routes(r *web.Route) *web.Route {
// socket connection
r.Get("/socket", socketServe)
@ -33,4 +33,6 @@ func Routes(r *web.Route) {
gRPCRouter(r, grpc.HealthRoute)
gRPCRouter(r, grpc.PingRoute)
gRPCRouter(r, grpc.RunnerRoute)
return r
}