Disable router when a rule has an error
This commit is contained in:
parent
ac8e47579b
commit
63f65e5b2a
3 changed files with 41 additions and 1 deletions
|
@ -62,6 +62,29 @@ func TestRouterManager_Get(t *testing.T) {
|
|||
entryPoints: []string{"web"},
|
||||
expected: expectedResult{StatusCode: http.StatusOK},
|
||||
},
|
||||
{
|
||||
desc: "empty host",
|
||||
routersConfig: map[string]*dynamic.Router{
|
||||
"foo": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "foo-service",
|
||||
Rule: "Host(``)",
|
||||
},
|
||||
},
|
||||
serviceConfig: map[string]*dynamic.Service{
|
||||
"foo-service": {
|
||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||
Servers: []dynamic.Server{
|
||||
{
|
||||
URL: server.URL,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
entryPoints: []string{"web"},
|
||||
expected: expectedResult{StatusCode: http.StatusNotFound},
|
||||
},
|
||||
{
|
||||
desc: "no load balancer",
|
||||
routersConfig: map[string]*dynamic.Router{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue