mirror of
https://github.com/alibaba/higress.git
synced 2026-03-18 01:07:29 +08:00
feat(transformer): Add split and retain strategy for dedupe (#2761)
This commit is contained in:
@@ -93,6 +93,7 @@ type Request struct {
|
||||
Method string
|
||||
Path string
|
||||
Headers map[string]string
|
||||
RawHeaders http.Header
|
||||
Body []byte
|
||||
ContentType string
|
||||
UnfollowRedirect bool
|
||||
@@ -240,6 +241,14 @@ func MakeRequestAndExpectEventuallyConsistentResponse(t *testing.T, r roundtripp
|
||||
}
|
||||
}
|
||||
|
||||
if expected.Request.ActualRequest.RawHeaders != nil {
|
||||
for name, values := range expected.Request.ActualRequest.RawHeaders {
|
||||
for _, value := range values {
|
||||
req.Headers[name] = append(req.Headers[name], strings.TrimSpace(value))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
backendSetHeaders := make([]string, 0, len(expected.Response.AdditionalResponseHeaders))
|
||||
for name, val := range expected.Response.AdditionalResponseHeaders {
|
||||
backendSetHeaders = append(backendSetHeaders, name+":"+val)
|
||||
@@ -755,7 +764,7 @@ func (er *Assertion) GetTestCaseName(i int) string {
|
||||
headerStr := ""
|
||||
reqStr := ""
|
||||
|
||||
if er.Request.ActualRequest.Headers != nil {
|
||||
if er.Request.ActualRequest.Headers != nil || er.Request.ActualRequest.RawHeaders != nil {
|
||||
headerStr = " with headers"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user