Missing Backend key in configuration when application has no tasks

This commit is contained in:
Alex Antonov 2017-11-01 05:26:03 -05:00 committed by Traefiker
parent d3c7681bc5
commit 02035d4942
2 changed files with 4 additions and 1 deletions

View file

@ -93,7 +93,9 @@ func TestMarathonLoadConfigNonAPIErrors(t *testing.T) {
}, },
}, },
}, },
expectedBackends: nil, expectedBackends: map[string]*types.Backend{
"backend-app": {},
},
}, },
{ {
desc: "load balancer / circuit breaker labels", desc: "load balancer / circuit breaker labels",

View file

@ -12,6 +12,7 @@
{{range $app := $apps}} {{range $app := $apps}}
{{range $serviceIndex, $serviceName := getServiceNames $app}} {{range $serviceIndex, $serviceName := getServiceNames $app}}
[backends."backend{{getBackend $app $serviceName }}"]
{{ if hasMaxConnLabels $app }} {{ if hasMaxConnLabels $app }}
[backends."backend{{getBackend $app $serviceName }}".maxconn] [backends."backend{{getBackend $app $serviceName }}".maxconn]
amount = {{getMaxConnAmount $app }} amount = {{getMaxConnAmount $app }}