Add name to some case to help debug
This commit is contained in:
parent
c2a445370e
commit
1c8d3ded3d
1 changed files with 11 additions and 11 deletions
|
@ -371,13 +371,13 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
task: marathon.Task{
|
task: marathon.Task{
|
||||||
AppID: "foo",
|
AppID: "multiple-ports",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
},
|
},
|
||||||
applications: &marathon.Applications{
|
applications: &marathon.Applications{
|
||||||
Apps: []marathon.Application{
|
Apps: []marathon.Application{
|
||||||
{
|
{
|
||||||
ID: "foo",
|
ID: "multiple-ports",
|
||||||
Ports: []int{80, 443},
|
Ports: []int{80, 443},
|
||||||
Labels: &map[string]string{},
|
Labels: &map[string]string{},
|
||||||
},
|
},
|
||||||
|
@ -388,13 +388,13 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
task: marathon.Task{
|
task: marathon.Task{
|
||||||
AppID: "foo",
|
AppID: "disable",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
},
|
},
|
||||||
applications: &marathon.Applications{
|
applications: &marathon.Applications{
|
||||||
Apps: []marathon.Application{
|
Apps: []marathon.Application{
|
||||||
{
|
{
|
||||||
ID: "foo",
|
ID: "disable",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
Labels: &map[string]string{
|
Labels: &map[string]string{
|
||||||
"traefik.enable": "false",
|
"traefik.enable": "false",
|
||||||
|
@ -523,7 +523,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
task: marathon.Task{
|
task: marathon.Task{
|
||||||
AppID: "foo",
|
AppID: "healthcheck-false",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
HealthCheckResults: []*marathon.HealthCheckResult{
|
HealthCheckResults: []*marathon.HealthCheckResult{
|
||||||
{
|
{
|
||||||
|
@ -534,7 +534,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
applications: &marathon.Applications{
|
applications: &marathon.Applications{
|
||||||
Apps: []marathon.Application{
|
Apps: []marathon.Application{
|
||||||
{
|
{
|
||||||
ID: "foo",
|
ID: "healthcheck-false",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
Labels: &map[string]string{},
|
Labels: &map[string]string{},
|
||||||
HealthChecks: &[]marathon.HealthCheck{
|
HealthChecks: &[]marathon.HealthCheck{
|
||||||
|
@ -576,13 +576,13 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
task: marathon.Task{
|
task: marathon.Task{
|
||||||
AppID: "foo",
|
AppID: "single-port",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
},
|
},
|
||||||
applications: &marathon.Applications{
|
applications: &marathon.Applications{
|
||||||
Apps: []marathon.Application{
|
Apps: []marathon.Application{
|
||||||
{
|
{
|
||||||
ID: "foo",
|
ID: "single-port",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
Labels: &map[string]string{},
|
Labels: &map[string]string{},
|
||||||
},
|
},
|
||||||
|
@ -593,7 +593,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
task: marathon.Task{
|
task: marathon.Task{
|
||||||
AppID: "foo",
|
AppID: "healthcheck-alive",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
HealthCheckResults: []*marathon.HealthCheckResult{
|
HealthCheckResults: []*marathon.HealthCheckResult{
|
||||||
{
|
{
|
||||||
|
@ -604,7 +604,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
applications: &marathon.Applications{
|
applications: &marathon.Applications{
|
||||||
Apps: []marathon.Application{
|
Apps: []marathon.Application{
|
||||||
{
|
{
|
||||||
ID: "foo",
|
ID: "healthcheck-alive",
|
||||||
Ports: []int{80},
|
Ports: []int{80},
|
||||||
Labels: &map[string]string{},
|
Labels: &map[string]string{},
|
||||||
HealthChecks: &[]marathon.HealthCheck{
|
HealthChecks: &[]marathon.HealthCheck{
|
||||||
|
@ -677,7 +677,7 @@ func TestMarathonTaskFilter(t *testing.T) {
|
||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
actual := provider.taskFilter(c.task, c.applications, c.exposedByDefault)
|
actual := provider.taskFilter(c.task, c.applications, c.exposedByDefault)
|
||||||
if actual != c.expected {
|
if actual != c.expected {
|
||||||
t.Fatalf("expected %v, got %v", c.expected, actual)
|
t.Fatalf("App %s: expected %v, got %v", c.task.AppID, c.expected, actual)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue