Use first port by default
If no information is given, use first index of ports
This commit is contained in:
parent
1c8d3ded3d
commit
5641af437e
2 changed files with 5 additions and 8 deletions
|
@ -372,7 +372,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
|||
{
|
||||
task: marathon.Task{
|
||||
AppID: "multiple-ports",
|
||||
Ports: []int{80},
|
||||
Ports: []int{80, 443},
|
||||
},
|
||||
applications: &marathon.Applications{
|
||||
Apps: []marathon.Application{
|
||||
|
@ -383,7 +383,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
expected: false,
|
||||
expected: true,
|
||||
exposedByDefault: true,
|
||||
},
|
||||
{
|
||||
|
@ -927,12 +927,12 @@ func TestMarathonGetPort(t *testing.T) {
|
|||
{
|
||||
applications: []marathon.Application{
|
||||
{
|
||||
ID: "test1",
|
||||
ID: "multiple-ports-take-first",
|
||||
Labels: &map[string]string{},
|
||||
},
|
||||
},
|
||||
task: marathon.Task{
|
||||
AppID: "test1",
|
||||
AppID: "multiple-ports-take-first",
|
||||
Ports: []int{80, 443},
|
||||
},
|
||||
expected: "80",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue