Add header filter to api-gateway xDS golden test

pull/17644/head
Nathan Coleman 1 year ago
parent ec347ef01d
commit 41a0d77e48

@ -415,6 +415,19 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase {
Kind: structs.HTTPRoute, Kind: structs.HTTPRoute,
Name: "route", Name: "route",
Rules: []structs.HTTPRouteRule{{ Rules: []structs.HTTPRouteRule{{
Filters: structs.HTTPFilters{
Headers: []structs.HTTPHeaderFilter{
{
Add: map[string]string{
"X-Header-Add": "added",
},
Set: map[string]string{
"X-Header-Set": "set",
},
Remove: []string{"X-Header-Remove"},
},
},
},
Services: []structs.HTTPService{{ Services: []structs.HTTPService{{
Name: "service", Name: "service",
}}, }},

@ -18,8 +18,46 @@
}, },
"route": { "route": {
"cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul" "cluster": "service.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul"
} },
"requestHeadersToAdd": [
{
"header": {
"key": "X-Header-Add",
"value": "added"
},
"append": true
},
{
"header": {
"key": "X-Header-Set",
"value": "set"
},
"append": false
}
],
"requestHeadersToRemove": [
"X-Header-Remove"
]
}
],
"requestHeadersToAdd": [
{
"header": {
"key": "X-Header-Add",
"value": "added"
},
"append": true
},
{
"header": {
"key": "X-Header-Set",
"value": "set"
},
"append": false
} }
],
"requestHeadersToRemove": [
"X-Header-Remove"
] ]
} }
], ],

Loading…
Cancel
Save