Cleaning up some code

This commit is contained in:
Diptanu Choudhury
2016-08-16 15:22:26 -07:00
parent 38689d0148
commit 53ab5d52d8
2 changed files with 6 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import (
"testing"
"time"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/nomad/structs/config"
@@ -25,7 +26,7 @@ var (
Type: structs.ServiceCheckTCP,
Interval: 30 * time.Second,
Timeout: 5 * time.Second,
InitialStatus: "passing",
InitialStatus: api.HealthPassing,
}
check2 = structs.ServiceCheck{
Name: "check1",
@@ -87,7 +88,7 @@ func TestCheckRegistration(t *testing.T) {
t.Fatalf("expected: %v, actual: %v", expected, check3Reg.HTTP)
}
expected = "passing"
expected = api.HealthPassing
if check1Reg.Status != expected {
t.Fatalf("expected: %v, actual: %v", expected, check1Reg.Status)
}

View File

@@ -8,6 +8,8 @@ import (
"time"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/consul/api"
)
func TestParse(t *testing.T) {
@@ -410,7 +412,7 @@ func TestParse(t *testing.T) {
Type: "http",
Interval: 10 * time.Second,
Timeout: 2 * time.Second,
InitialStatus: "passing",
InitialStatus: api.HealthPassing,
},
},
},