Skip to content

Commit

Permalink
Make existing unit tests more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Sep 5, 2023
1 parent 52e0c79 commit c8d2f21
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions agent/consul/discoverychain/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,24 @@ func TestGatewayChainSynthesizer_Synthesize(t *testing.T) {
Kind: structs.HTTPRoute,
Name: "http-route",
Rules: []structs.HTTPRouteRule{{
Filters: structs.HTTPFilters{
Headers: []structs.HTTPHeaderFilter{
{
Add: map[string]string{"add me on the request": "hello world"},
Set: map[string]string{"set me on the request": "hello world"},
Remove: []string{"remove me on the request"},
},
},
},
ResponseFilters: structs.HTTPResponseFilters{
Headers: []structs.HTTPHeaderFilter{
{
Add: map[string]string{"add me on the response": "hello world"},
Set: map[string]string{"set me on the response": "hello world"},
Remove: []string{"remove me on the response"},
},
},
},
Services: []structs.HTTPService{{
Name: "foo",
}},
Expand Down Expand Up @@ -557,12 +575,14 @@ func TestGatewayChainSynthesizer_Synthesize(t *testing.T) {
Partition: "default",
Namespace: "default",
RequestHeaders: &structs.HTTPHeaderModifiers{
Add: make(map[string]string),
Set: make(map[string]string),
Add: map[string]string{"add me on the request": "hello world"},
Set: map[string]string{"set me on the request": "hello world"},
Remove: []string{"remove me on the request"},
},
ResponseHeaders: &structs.HTTPHeaderModifiers{
Add: make(map[string]string),
Set: make(map[string]string),
Add: map[string]string{"add me on the response": "hello world"},
Set: map[string]string{"set me on the response": "hello world"},
Remove: []string{"remove me on the response"},
},
},
},
Expand Down

0 comments on commit c8d2f21

Please sign in to comment.