diff --git a/command/agent/consul/syncer_test.go b/command/agent/consul/syncer_test.go index 938770b37..21fa327a5 100644 --- a/command/agent/consul/syncer_test.go +++ b/command/agent/consul/syncer_test.go @@ -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) } diff --git a/jobspec/parse_test.go b/jobspec/parse_test.go index 1e0657917..2a83e1342 100644 --- a/jobspec/parse_test.go +++ b/jobspec/parse_test.go @@ -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, }, }, },