Skip to content

Commit

Permalink
Merge pull request #1540 from containous/marathon-add-tests-lost-duri…
Browse files Browse the repository at this point in the history
…ng-1320-rebase

Add tests lost during PR 1320.
  • Loading branch information
ldez committed May 3, 2017
2 parents e86df01 + 1dcf8d2 commit a5384ba
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions provider/marathon/marathon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,62 @@ func TestMarathonLoadConfig(t *testing.T) {
},
},
},
{
applications: &marathon.Applications{
Apps: []marathon.Application{
{
ID: "/testHealthCheck",
Ports: []int{80},
Labels: &map[string]string{
labelBackendHealthCheckPath: "/path",
labelBackendHealthCheckInterval: "5m",
},
},
},
},
tasks: &marathon.Tasks{
Tasks: []marathon.Task{
{
ID: "testHealthCheck",
AppID: "/testHealthCheck",
Host: "127.0.0.1",
Ports: []int{80},
IPAddresses: []*marathon.IPAddress{
{
IPAddress: "127.0.0.1",
Protocol: "tcp",
},
},
},
},
},
expectedFrontends: map[string]*types.Frontend{
"frontend-testHealthCheck": {
Backend: "backend-testHealthCheck",
PassHostHeader: true,
EntryPoints: []string{},
Routes: map[string]types.Route{
"route-host-testHealthCheck": {
Rule: "Host:testHealthCheck.docker.localhost",
},
},
},
},
expectedBackends: map[string]*types.Backend{
"backend-testHealthCheck": {
Servers: map[string]types.Server{
"server-testHealthCheck": {
URL: "http://127.0.0.1:80",
Weight: 0,
},
},
HealthCheck: &types.HealthCheck{
Path: "/path",
Interval: "5m",
},
},
},
},
}

for _, c := range cases {
Expand Down

0 comments on commit a5384ba

Please sign in to comment.