fix make verify-all failures
This commit is contained in:
parent
4b76ad14bb
commit
9198e2c14b
3 changed files with 6 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -645,14 +645,14 @@ func buildUpstreamName(host string, b interface{}, loc interface{}, dynamicConfi
|
||||||
|
|
||||||
upstreamName := location.Backend
|
upstreamName := location.Backend
|
||||||
|
|
||||||
if !dynamicConfigurationEnabled{
|
if !dynamicConfigurationEnabled {
|
||||||
for _, backend := range backends {
|
for _, backend := range backends {
|
||||||
if backend.Name == location.Backend {
|
if backend.Name == location.Backend {
|
||||||
if backend.SessionAffinity.AffinityType == "cookie" &&
|
if backend.SessionAffinity.AffinityType == "cookie" &&
|
||||||
isSticky(host, location, backend.SessionAffinity.CookieSessionAffinity.Locations) {
|
isSticky(host, location, backend.SessionAffinity.CookieSessionAffinity.Locations) {
|
||||||
upstreamName = fmt.Sprintf("sticky-%v", upstreamName)
|
upstreamName = fmt.Sprintf("sticky-%v", upstreamName)
|
||||||
}
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -730,8 +730,8 @@ func TestBuildUpstreamName(t *testing.T) {
|
||||||
expected := defaultBackend
|
expected := defaultBackend
|
||||||
|
|
||||||
if tc.Sticky {
|
if tc.Sticky {
|
||||||
if !tc.DynamicConfigurationEnabled{
|
if !tc.DynamicConfigurationEnabled {
|
||||||
expected = fmt.Sprintf("sticky-" + expected)
|
expected = fmt.Sprintf("sticky-" + expected)
|
||||||
}
|
}
|
||||||
|
|
||||||
backend.SessionAffinity = ingress.SessionAffinityConfig{
|
backend.SessionAffinity = ingress.SessionAffinityConfig{
|
||||||
|
@ -751,4 +751,4 @@ func TestBuildUpstreamName(t *testing.T) {
|
||||||
t.Errorf("%s: expected \n'%v'\nbut returned \n'%v'", k, expected, pp)
|
t.Errorf("%s: expected \n'%v'\nbut returned \n'%v'", k, expected, pp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue