1
0
Fork 0

Backward compatibility for sticky

This commit is contained in:
Ludovic Fernandez 2017-10-16 17:38:03 +02:00 committed by Traefiker
parent 3afd6024b5
commit 08503655d9
22 changed files with 140 additions and 260 deletions

View file

@ -904,43 +904,19 @@ func TestConsulCatalogHasStickinessLabel(t *testing.T) {
tags: []string{},
expected: false,
},
{
desc: "sticky=true",
tags: []string{
"traefik.backend.loadbalancer.sticky=true",
},
expected: true,
},
{
desc: "stickiness=true",
tags: []string{
"traefik.backend.loadbalancer.stickiness=true",
types.LabelBackendLoadbalancerStickiness + "=true",
},
expected: true,
},
{
desc: "sticky=true and stickiness=true",
desc: "stickiness=false",
tags: []string{
"traefik.backend.loadbalancer.sticky=true",
"traefik.backend.loadbalancer.stickiness=true",
types.LabelBackendLoadbalancerStickiness + "=false",
},
expected: true,
},
{
desc: "sticky=false and stickiness=true",
tags: []string{
"traefik.backend.loadbalancer.sticky=true",
"traefik.backend.loadbalancer.stickiness=false",
},
expected: true,
},
{
desc: "sticky=true and stickiness=false",
tags: []string{
"traefik.backend.loadbalancer.sticky=true",
"traefik.backend.loadbalancer.stickiness=false",
},
expected: true,
expected: false,
},
}