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

@ -616,16 +616,6 @@ func TestRancherHasStickinessLabel(t *testing.T) {
},
expected: false,
},
{
desc: "sticky=true",
service: rancherData{
Name: "test-service",
Labels: map[string]string{
types.LabelBackendLoadbalancerSticky: "true",
},
},
expected: true,
},
{
desc: "stickiness=true",
service: rancherData{
@ -637,49 +627,15 @@ func TestRancherHasStickinessLabel(t *testing.T) {
expected: true,
},
{
desc: "sticky=true and stickiness=true",
desc: "stickiness=true",
service: rancherData{
Name: "test-service",
Labels: map[string]string{
types.LabelBackendLoadbalancerSticky: "true",
types.LabelBackendLoadbalancerStickiness: "true",
},
},
expected: true,
},
{
desc: "sticky=false and stickiness=false",
service: rancherData{
Name: "test-service",
Labels: map[string]string{
types.LabelBackendLoadbalancerSticky: "false",
types.LabelBackendLoadbalancerStickiness: "false",
},
},
expected: false,
},
{
desc: "sticky=true and stickiness=false",
service: rancherData{
Name: "test-service",
Labels: map[string]string{
types.LabelBackendLoadbalancerSticky: "true",
types.LabelBackendLoadbalancerStickiness: "false",
},
},
expected: true,
},
{
desc: "sticky=false and stickiness=true",
service: rancherData{
Name: "test-service",
Labels: map[string]string{
types.LabelBackendLoadbalancerSticky: "false",
types.LabelBackendLoadbalancerStickiness: "true",
},
},
expected: true,
},
}
for _, test := range testCases {