feat: support http->http in gateway (#4605)

This commit is contained in:
Kevin Wan
2025-01-27 20:00:58 +08:00
committed by GitHub
parent c71829c8de
commit d415ba39e2
6 changed files with 372 additions and 76 deletions

View File

@@ -6,15 +6,11 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/zeromicro/go-zero/core/logx"
)
func TestMetricsInterceptor(t *testing.T) {
c := gomock.NewController(t)
defer c.Finish()
logx.Disable()
svr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

View File

@@ -183,7 +183,6 @@ func request(r *http.Request, cli client) (*http.Response, error) {
for i := len(respHandlers) - 1; i >= 0; i-- {
respHandlers[i](resp, err)
}
if err != nil {
span.RecordError(err)
span.SetStatus(codes.Error, err.Error())