Backward compatibility for sticky
This commit is contained in:
parent
3afd6024b5
commit
08503655d9
22 changed files with 140 additions and 260 deletions
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue