Ignore server for container with empty IP address.

This commit is contained in:
Ludovic Fernandez 2018-04-22 09:10:03 +02:00 committed by Traefiker Bot
parent 5924a40222
commit 7ef8d6fa10
4 changed files with 145 additions and 2 deletions

View file

@ -832,6 +832,18 @@ func TestGetServers(t *testing.T) {
},
expected: nil,
},
{
desc: "should return nil when no server IPs",
service: rancherData{
Labels: map[string]string{
label.TraefikWeight: "7",
},
Containers: []string{""},
Health: "healthy",
State: "active",
},
expected: nil,
},
{
desc: "should use default weight when invalid weight value",
service: rancherData{