1
0
Fork 0

Allow traefik.port to not be in the list of marathon ports

This commit is contained in:
Nic Grayson 2017-03-20 08:16:34 -05:00 committed by Emile Vauge
parent e1aa16ae70
commit 4eb779e596
No known key found for this signature in database
GPG key ID: D808B4C167352E59
2 changed files with 4 additions and 37 deletions

View file

@ -519,39 +519,19 @@ func TestMarathonTaskFilter(t *testing.T) {
{
task: marathon.Task{
AppID: "specify-port-number",
Ports: []int{80, 443},
Ports: []int{80},
},
applications: &marathon.Applications{
Apps: []marathon.Application{
{
ID: "specify-port-number",
Ports: []int{80, 443},
Labels: &map[string]string{
"traefik.port": "80",
},
},
},
},
expected: true,
exposedByDefault: true,
},
{
task: marathon.Task{
AppID: "specify-unknown-port-number",
Ports: []int{80, 443},
},
applications: &marathon.Applications{
Apps: []marathon.Application{
{
ID: "specify-unknown-port-number",
Ports: []int{80, 443},
ID: "specify-port-number",
Labels: &map[string]string{
"traefik.port": "8080",
},
},
},
},
expected: false,
expected: true,
exposedByDefault: true,
},
{