mirror of
https://github.com/alibaba/higress.git
synced 2026-05-30 07:37:26 +08:00
Support HTTP/JSON to dubbo (#340)
This commit is contained in:
@@ -59,6 +59,8 @@ type AssertionResponse struct {
|
||||
// AdditionalResponseHeaders is a set of headers
|
||||
// the echoserver should set in its response.
|
||||
AdditionalResponseHeaders map[string]string
|
||||
// set not need to judge response has request info
|
||||
ExpectedResponseNoRequest bool
|
||||
}
|
||||
|
||||
// Request can be used as both the request to make and a means to verify
|
||||
@@ -263,7 +265,7 @@ func CompareRequest(req *roundtripper.Request, cReq *roundtripper.CapturedReques
|
||||
if expected.Response.ExpectedResponse.StatusCode != cRes.StatusCode {
|
||||
return fmt.Errorf("expected status code to be %d, got %d", expected.Response.ExpectedResponse.StatusCode, cRes.StatusCode)
|
||||
}
|
||||
if cRes.StatusCode == 200 {
|
||||
if cRes.StatusCode == 200 && !expected.Response.ExpectedResponseNoRequest {
|
||||
// The request expected to arrive at the backend is
|
||||
// the same as the request made, unless otherwise
|
||||
// specified.
|
||||
|
||||
Reference in New Issue
Block a user