99 "strings"
1010 "testing"
1111
12- "github.com/gorilla/mux"
1312 "google.golang.org/genproto/googleapis/api/httpbody"
1413 rpchttp "google.golang.org/genproto/googleapis/rpc/http"
1514 "google.golang.org/protobuf/types/known/emptypb"
@@ -54,8 +53,8 @@ func (m *MockBodyService) StarBody(ctx context.Context, request *BodyRequest) (*
5453}
5554
5655func runServer (server * http.Server ) {
57- router := mux . NewRouter ()
58- router = AppendBodyGorillaRoute (router , & MockBodyService {})
56+ router := http . NewServeMux ()
57+ router = AppendBodyGooseRoute (router , & MockBodyService {})
5958 server .Addr = ":28080"
6059 server .Handler = router
6160 if err := server .ListenAndServe (); err != nil {
@@ -64,8 +63,8 @@ func runServer(server *http.Server) {
6463}
6564
6665func TestStarBody (t * testing.T ) {
67- router := mux . NewRouter ()
68- router = AppendBodyGorillaRoute (router , & MockBodyService {})
66+ router := http . NewServeMux ()
67+ router = AppendBodyGooseRoute (router , & MockBodyService {})
6968 server := httptest .NewServer (router )
7069 url := server .URL + "/v1/star/body"
7170 contentType := "application/json"
@@ -85,8 +84,8 @@ func TestStarBody(t *testing.T) {
8584}
8685
8786func TestNamedBody (t * testing.T ) {
88- router := mux . NewRouter ()
89- router = AppendBodyGorillaRoute (router , & MockBodyService {})
87+ router := http . NewServeMux ()
88+ router = AppendBodyGooseRoute (router , & MockBodyService {})
9089 server := httptest .NewServer (router )
9190 url := server .URL + "/v1/star/body"
9291 contentType := "application/json"
@@ -106,8 +105,8 @@ func TestNamedBody(t *testing.T) {
106105}
107106
108107func TestNonBody (t * testing.T ) {
109- router := mux . NewRouter ()
110- router = AppendBodyGorillaRoute (router , & MockBodyService {})
108+ router := http . NewServeMux ()
109+ router = AppendBodyGooseRoute (router , & MockBodyService {})
111110 server := httptest .NewServer (router )
112111 url := server .URL + "/v1/star/body"
113112 contentType := "application/json"
@@ -127,8 +126,8 @@ func TestNonBody(t *testing.T) {
127126}
128127
129128func TestHttpBodyStarBody (t * testing.T ) {
130- router := mux . NewRouter ()
131- router = AppendBodyGorillaRoute (router , & MockBodyService {})
129+ router := http . NewServeMux ()
130+ router = AppendBodyGooseRoute (router , & MockBodyService {})
132131 server := httptest .NewServer (router )
133132 url := server .URL + "/v1/star/body"
134133 contentType := "application/json"
@@ -148,8 +147,8 @@ func TestHttpBodyStarBody(t *testing.T) {
148147}
149148
150149func TestHttpBodyNamedBody (t * testing.T ) {
151- router := mux . NewRouter ()
152- router = AppendBodyGorillaRoute (router , & MockBodyService {})
150+ router := http . NewServeMux ()
151+ router = AppendBodyGooseRoute (router , & MockBodyService {})
153152 server := httptest .NewServer (router )
154153 url := server .URL + "/v1/star/body"
155154 contentType := "application/json"
@@ -169,8 +168,8 @@ func TestHttpBodyNamedBody(t *testing.T) {
169168}
170169
171170func TestHttpRequest (t * testing.T ) {
172- router := mux . NewRouter ()
173- router = AppendBodyGorillaRoute (router , & MockBodyService {})
171+ router := http . NewServeMux ()
172+ router = AppendBodyGooseRoute (router , & MockBodyService {})
174173 server := httptest .NewServer (router )
175174 url := server .URL + "/v1/star/body"
176175 contentType := "application/json"
0 commit comments