1
0
Fork 0

Server weight zero

This commit is contained in:
Ludovic Fernandez 2018-04-11 16:30:04 +02:00 committed by Traefiker Bot
parent edbcd01fbc
commit 8168d2fdc1
84 changed files with 378 additions and 273 deletions

View file

@ -57,7 +57,7 @@ func TestSwarmBuildConfigurationV1(t *testing.T) {
Servers: map[string]types.Server{
"server-test": {
URL: "http://127.0.0.1:80",
Weight: 0,
Weight: label.DefaultWeight,
},
},
},
@ -420,19 +420,19 @@ func TestSwarmGetFuncStringLabelV1(t *testing.T) {
}{
{
service: swarmService(),
labelName: label.TraefikWeight,
defaultValue: label.DefaultWeight,
labelName: label.TraefikProtocol,
defaultValue: label.DefaultProtocol,
networks: map[string]*docker.NetworkResource{},
expected: "0",
expected: "http",
},
{
service: swarmService(serviceLabels(map[string]string{
label.TraefikWeight: "10",
label.TraefikProtocol: "https",
})),
labelName: label.TraefikWeight,
defaultValue: label.DefaultWeight,
labelName: label.TraefikProtocol,
defaultValue: label.DefaultProtocol,
networks: map[string]*docker.NetworkResource{},
expected: "10",
expected: "https",
},
}