1
0
Fork 0

Fix panic when using chain middleware.

This commit is contained in:
Julien Salleyron 2020-07-09 10:50:04 +02:00 committed by GitHub
parent a55f0cabdd
commit b10cb84f33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -169,6 +169,21 @@ func TestBuilderBuild(t *testing.T) {
},
assertResponse: func(t *testing.T, resp *http.Response) {},
},
{
desc: "chain without headers",
middlewares: []string{"chain"},
buildResponse: stubResponse,
conf: map[string]*dynamic.Middleware{
"foo": {IPWhiteList: &dynamic.IPWhiteList{}},
"chain": {
Chain: &dynamic.Chain{
Middlewares: []string{"foo"},
},
},
},
assertResponse: func(t *testing.T, resp *http.Response) {},
},
}
for _, test := range testCases {