Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add header filter to api-gateway xDS golden test
Browse files Browse the repository at this point in the history
nathancoleman committed Jun 10, 2023

Verified

This commit was signed with the committer’s verified signature.
evenyag Yingwen
1 parent ec347ef commit 41a0d77
Showing 2 changed files with 52 additions and 1 deletion.
13 changes: 13 additions & 0 deletions agent/xds/resources_test.go
Original file line number Diff line number Diff line change
@@ -415,6 +415,19 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase {
Kind: structs.HTTPRoute,
Name: "route",
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{{
Name: "service",
}},
Original file line number Diff line number Diff line change
@@ -18,8 +18,46 @@
},
"route": {
"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"
]
}
],

0 comments on commit 41a0d77

Please sign in to comment.