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

@ -0,0 +1,20 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package ping
import (
"net/http"
"testing"
"gitea.com/gitea/proto-go/ping/v1/pingv1connect"
)
func TestService(t *testing.T) {
mux := http.NewServeMux()
mux.Handle(pingv1connect.NewPingServiceHandler(
&Service{},
))
MainServiceTest(t, mux)
}